FileSystemAccess.FileSystemExecutor<org.json.simple.JSONObject>@Private public static class FSOperations.FSTruncate extends java.lang.Object implements FileSystemAccess.FileSystemExecutor<org.json.simple.JSONObject>
| Constructor | Description |
|---|---|
FSTruncate(java.lang.String path,
long newLength) |
Creates a Truncate executor.
|
| Modifier and Type | Method | Description |
|---|---|---|
org.json.simple.JSONObject |
execute(org.apache.hadoop.fs.FileSystem fs) |
Executes the filesystem operation.
|
public FSTruncate(java.lang.String path,
long newLength)
path - target path to truncate to.newLength - The size the file is to be truncated to.public org.json.simple.JSONObject execute(org.apache.hadoop.fs.FileSystem fs)
throws java.io.IOException
execute in interface FileSystemAccess.FileSystemExecutor<org.json.simple.JSONObject>fs - filesystem instance to use.true if the file has been truncated to the desired,
false if a background process of adjusting the
length of the last block has been started, and clients should
wait for it to complete before proceeding with further file
updates.java.io.IOException - thrown if an IO error occurred.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.