Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
milenkovicm committed Nov 16, 2023
1 parent f1ad110 commit b971b47
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.2.0"
edition = "2021"

license = "MIT"
description = "HDFS Test Container"
description = "Opinionated single node HDFS cluster captured in a testcontainer."
homepage = "https://github.com/milenkovicm/testcontainers-minidfs-rs"
repository = "https://github.com/milenkovicm/testcontainers-minidfs-rs"
readme = "README.md"
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# MiniDFS Cluster
# Opinionated Single Node HDFS Cluster Testcontainer

[![github action](https://github.com/milenkovicm/testcontainers-minidfs-rs/actions/workflows/basic.yml/badge.svg)](https://github.com/milenkovicm/testcontainers-minidfs-rs/actions/workflows/basic.yml)
[![Crates.io](https://img.shields.io/crates/v/testcontainers-minidfs-rs)](https://crates.io/crates/testcontainers-minidfs-rs)
[![Crates.io](https://img.shields.io/crates/d/testcontainers-minidfs-rs)](https://crates.io/crates/testcontainers-minidfs-rs)

Testcontainer HDFS cluster using hadoop mini DFS.
Opinionated single node HDFS (DFS) cluster captured in a testcontainer.

```rust
```toml
testcontainers-minidfs-rs = "0.2"
```

Example:

```rust, no_run
use testcontainers::clients;
use testcontainers_minidfs_rs::*;
Expand Down Expand Up @@ -51,4 +57,5 @@ All required files needed for hdfs client setup are exposed. (`kinit` will be ex

## Limitations

- ports are hardcoded, thus only single instance per host is possible
- Ports are hardcoded, thus only single instance per host is possible
- Not many configuration option can be tunned
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ use log::info;
use std::path::PathBuf;
use testcontainers::{core::WaitFor, Image, ImageArgs, RunnableImage};

/// Namenode Port
pub const PORT_NAME_NODE: u16 = 9000;
/// Namenode HTTP Port
pub const PORT_NAME_NODE_HTTP: u16 = 8020;

const PORT_DATA_N0DE_0: u16 = 50010;
Expand All @@ -26,7 +28,7 @@ pub struct MiniDFSBuilder {
}

impl MiniDFSBuilder {
/// Select tag for testcontainer image
/// Select tag for testcontainer
pub fn with_tag(mut self, tag: &str) -> Self {
self.tag = tag.to_string();
self
Expand Down

0 comments on commit b971b47

Please sign in to comment.