Skip to content

Commit e9b4fe8

Browse files
committed
hdfs + hdrs
1 parent 4ce4f39 commit e9b4fe8

File tree

6 files changed

+30
-15
lines changed

6 files changed

+30
-15
lines changed

.github/workflows/build.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
working-directory: ./
4141
run: cargo fmt --check
4242

43-
with-default:
43+
default:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Install Protoc
@@ -70,6 +70,21 @@ jobs:
7070
working-directory: ./
7171
run: cargo test --verbose --features memory-prof -- --test-threads=1
7272

73+
aarch64-default:
74+
runs-on: ubuntu-22.04-arm
75+
steps:
76+
- name: Install Protoc
77+
uses: arduino/setup-protoc@v2
78+
with:
79+
version: "23.2"
80+
- uses: actions/checkout@v3
81+
- name: Build
82+
working-directory: ./
83+
run: cargo build --release
84+
- name: Unit tests
85+
working-directory: ./
86+
run: cargo test --verbose -- --test-threads=1
87+
7388
with-hdrs:
7489
runs-on: ubuntu-latest
7590
steps:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ memory-prof = ["jemalloc", "tikv-jemallocator/profiling", "allocator-analysis"]
4848

4949
hdfs = ["dep:hdfs-native"]
5050

51-
hdrs = ["hdfs", "dep:hdrs"]
51+
hdrs = ["dep:hdrs"]
5252

5353
allocator-analysis = ["dep:cap"]
5454

src/store/hadoop/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#[cfg(feature = "hdfs")]
1+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
22
mod hdfs_native;
33
#[cfg(feature = "hdrs")]
44
mod hdrs;
55

6-
#[cfg(feature = "hdfs")]
6+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
77
use crate::store::hadoop::hdfs_native::HdfsNativeClient;
88
#[cfg(feature = "hdrs")]
99
use crate::store::hadoop::hdrs::HdrsClient;
@@ -51,7 +51,7 @@ pub(crate) trait HdfsDelegator: Send + Sync {
5151
}
5252
}
5353

54-
#[cfg(feature = "hdfs")]
54+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
5555
pub fn get_hdfs_delegator(
5656
root: &str,
5757
configs: HashMap<String, String>,

src/store/hybrid.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use crate::metric::{
2929
TOTAL_MEMORY_SPILL_TO_LOCALFILE,
3030
};
3131
use crate::readable_size::ReadableSize;
32-
#[cfg(feature = "hdfs")]
32+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
3333
use crate::store::hdfs::HdfsStore;
3434
use crate::store::localfile::LocalFileStore;
3535
use crate::store::memory::MemoryStore;
@@ -73,7 +73,7 @@ impl PersistentStore for LocalFileStore {
7373
}
7474
}
7575

76-
#[cfg(feature = "hdfs")]
76+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
7777
impl PersistentStore for HdfsStore {
7878
fn as_any(&self) -> &dyn Any {
7979
self
@@ -127,12 +127,12 @@ impl HybridStore {
127127
}
128128

129129
if StorageType::contains_hdfs(&store_type) {
130-
#[cfg(not(feature = "hdfs"))]
130+
#[cfg(not(all(feature = "hdfs", feature = "hdrs")))]
131131
panic!("The binary is not compiled with feature of hdfs! So the storage type can't involve hdfs.");
132132

133-
#[cfg(feature = "hdfs")]
133+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
134134
let hdfs_store = HdfsStore::from(config.hdfs_store.unwrap(), &runtime_manager);
135-
#[cfg(feature = "hdfs")]
135+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
136136
persistent_stores.push_back(Box::new(hdfs_store));
137137
}
138138

@@ -202,10 +202,10 @@ impl HybridStore {
202202

203203
#[allow(unused)]
204204
fn is_hdfs(&self, store: &dyn Any) -> bool {
205-
#[cfg(feature = "hdfs")]
205+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
206206
return store.is::<HdfsStore>();
207207

208-
#[cfg(not(feature = "hdfs"))]
208+
#[cfg(not(all(feature = "hdfs", feature = "hdrs")))]
209209
false
210210
}
211211

src/store/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
pub mod alignment;
1919
mod hadoop;
20-
#[cfg(feature = "hdfs")]
20+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
2121
pub mod hdfs;
2222
pub mod hybrid;
2323
pub mod local;

src/store/spill/spill_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ mod tests {
193193
}
194194

195195
#[tokio::test]
196-
#[cfg(feature = "hdfs")]
196+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
197197
async fn test_single_buffer_spill() {
198198
GAUGE_MEMORY_SPILL_IN_QUEUE_BYTES.set(0);
199199

@@ -240,7 +240,7 @@ mod tests {
240240
}
241241

242242
#[tokio::test]
243-
#[cfg(feature = "hdfs")]
243+
#[cfg(any(feature = "hdfs", feature = "hdrs"))]
244244
async fn test_localfile_disk_unhealthy() {
245245
GAUGE_MEMORY_SPILL_IN_QUEUE_BYTES.set(0);
246246

0 commit comments

Comments
 (0)