Skip to content

Commit fdb6a31

Browse files
Flossyclaude
andcommitted
docs: add comprehensive Builder documentation to HdfsClassSource
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 80519a7 commit fdb6a31

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

src/main/java/org/flossware/classloader/filesystem/HdfsClassSource.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,40 @@ public static class Builder {
167167
private int socketTimeout = DEFAULT_SOCKET_TIMEOUT;
168168
private int connectTimeout = DEFAULT_CONNECT_TIMEOUT;
169169

170+
/**
171+
* Sets the HDFS NameNode URI.
172+
*
173+
* <p>Format: {@code hdfs://hostname:port}</p>
174+
*
175+
* <p>Examples:</p>
176+
* <ul>
177+
* <li>Single NameNode: "hdfs://namenode.example.com:9000"</li>
178+
* <li>HA NameNode: "hdfs://mycluster" (requires core-site.xml configuration)</li>
179+
* <li>Local testing: "hdfs://localhost:9000"</li>
180+
* </ul>
181+
*
182+
* <p>If not set, uses fs.defaultFS from Hadoop configuration files.</p>
183+
*
184+
* @param nameNodeUri NameNode URI (null to use configuration files)
185+
* @return this builder
186+
*/
170187
public Builder nameNodeUri(String nameNodeUri) {
171188
this.nameNodeUri = nameNodeUri;
172189
return this;
173190
}
174191

192+
/**
193+
* Sets the base directory path in HDFS.
194+
*
195+
* <p>Classes are loaded from: {@code basePath + "/" + className.replace('.', '/') + ".class"}</p>
196+
*
197+
* <p>Example: If basePath is "/app/classes" and loading "com.example.MyClass",
198+
* the HDFS path will be "/app/classes/com/example/MyClass.class"</p>
199+
*
200+
* @param basePath Base directory path (default: "/")
201+
* @return this builder
202+
* @throws NullPointerException if basePath is null
203+
*/
175204
public Builder basePath(String basePath) {
176205
this.basePath = Objects.requireNonNull(basePath, "basePath cannot be null");
177206
return this;

0 commit comments

Comments
 (0)