Skip to content

Commit 753383a

Browse files
committed
feat: remove hotpath layer and logging layer.
1 parent 554b6e2 commit 753383a

File tree

5 files changed

+3
-68
lines changed

5 files changed

+3
-68
lines changed

bindings/java/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ default = [
5050
"layers-mime-guess",
5151
"layers-throttle",
5252
"layers-timeout",
53-
"layers-hotpath",
5453
]
5554

5655
services-all = [
@@ -159,8 +158,6 @@ services-webdav = ["opendal/services-webdav"]
159158
services-webhdfs = ["opendal/services-webhdfs"]
160159
services-yandex-disk = ["opendal/services-yandex-disk"]
161160

162-
layers-hotpath = ["opendal/layers-hotpath"]
163-
layers-logging = ["opendal/layers-logging"]
164161
layers-mime-guess = ["opendal/layers-mime-guess"]
165162
layers-throttle = ["opendal/layers-throttle"]
166163
layers-timeout = ["opendal/layers-timeout"]

bindings/java/src/layer.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use jni::sys::jfloat;
2424
use jni::sys::jlong;
2525
use opendal::Operator;
2626
use opendal::layers::ConcurrentLimitLayer;
27-
use opendal::layers::HotpathLayer;
2827
use opendal::layers::LoggingLayer;
2928
use opendal::layers::MimeGuessLayer;
3029
use opendal::layers::RetryLayer;
@@ -117,14 +116,3 @@ pub extern "system" fn Java_org_apache_opendal_layer_ThrottleLayer_doLayer(
117116
let throttle = ThrottleLayer::new(bandwidth as u32, burst as u32);
118117
Box::into_raw(Box::new(op.clone().layer(throttle))) as jlong
119118
}
120-
121-
#[unsafe(no_mangle)]
122-
pub extern "system" fn Java_org_apache_opendal_layer_HotpathLayer_doLayer(
123-
_: JNIEnv,
124-
_: JClass,
125-
op: *mut Operator,
126-
) -> jlong {
127-
let op = unsafe { &*op };
128-
let hotpath = HotpathLayer::new();
129-
Box::into_raw(Box::new(op.clone().layer(hotpath))) as jlong
130-
}

bindings/java/src/main/java/org/apache/opendal/layer/HotpathLayer.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

bindings/java/src/main/java/org/apache/opendal/layer/LoggingLayer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
/**
2525
* This layer adds structured logging for every operation.
2626
*
27+
* <p>Note: This layer requires proper logging setup (e.g., log4j2, java.util.logging) to work.
28+
* Without logging configuration, this layer is a no-op.
29+
*
2730
* @see <a href="https://docs.rs/opendal/latest/opendal/layers/struct.LoggingLayer.html">LoggingLayer's rustdoc</a>
2831
*/
2932
public class LoggingLayer extends Layer {

bindings/java/src/test/java/org/apache/opendal/test/LayerTest.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.apache.opendal.Layer;
2626
import org.apache.opendal.ServiceConfig;
2727
import org.apache.opendal.layer.ConcurrentLimitLayer;
28-
import org.apache.opendal.layer.HotpathLayer;
2928
import org.apache.opendal.layer.LoggingLayer;
3029
import org.apache.opendal.layer.MimeGuessLayer;
3130
import org.apache.opendal.layer.RetryLayer;
@@ -93,14 +92,4 @@ void testOperatorWithThrottleLayer() {
9392
@Cleanup final AsyncOperator layeredOp = op.layer(throttleLayer);
9493
assertThat(layeredOp.info).isNotNull();
9594
}
96-
97-
@Test
98-
void testOperatorWithHotpathLayer() {
99-
final ServiceConfig.Memory memory =
100-
ServiceConfig.Memory.builder().root("/opendal/").build();
101-
final Layer hotpathLayer = new HotpathLayer();
102-
@Cleanup final AsyncOperator op = AsyncOperator.of(memory);
103-
@Cleanup final AsyncOperator layeredOp = op.layer(hotpathLayer);
104-
assertThat(layeredOp.info).isNotNull();
105-
}
10695
}

0 commit comments

Comments
 (0)