Package alluxio.cli.fs.command
Class DistributedLoadUtils
- java.lang.Object
-
- alluxio.cli.fs.command.DistributedLoadUtils
-
public final class DistributedLoadUtils extends java.lang.ObjectUtilities Loads a file or directory in Alluxio space, makes it resident in memory.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intdistributedLoad(AbstractDistributedJobCommand command, org.apache.commons.cli.CommandLine cl, java.lang.String pathStr)Run the actual distributedLoad command.static org.apache.commons.cli.OptionsgetDistLoadCommonOptions()Get the general options that distributed load needs to use.static java.lang.StringgetDistLoadCommonUsage()Get the general usage of distributed load.static org.apache.commons.cli.OptionsgetDistLoadFileSemanticsOptions()Get the options of distributed load needs to use in file semantics.static java.lang.StringgetDistLoadFileSemanticsUsage()Get usage of distributed load in file semantics.static longrunDistLoad(AbstractDistributedJobCommand command, alluxio.AlluxioURI filePath, int replication, int batchSize, java.util.Set<java.lang.String> workerSet, java.util.Set<java.lang.String> excludedWorkerSet, java.util.Set<java.lang.String> localityIds, java.util.Set<java.lang.String> excludedLocalityIds, boolean directCache)Run the actual distributedLoad command.
-
-
-
Method Detail
-
getDistLoadCommonOptions
public static org.apache.commons.cli.Options getDistLoadCommonOptions()
Get the general options that distributed load needs to use. Suitable for file semantics and structured data semantics.- Returns:
- general options
-
getDistLoadFileSemanticsOptions
public static org.apache.commons.cli.Options getDistLoadFileSemanticsOptions()
Get the options of distributed load needs to use in file semantics.- Returns:
- options in file semantics
-
getDistLoadCommonUsage
public static java.lang.String getDistLoadCommonUsage()
Get the general usage of distributed load. Suitable for file semantics and structured data semantics.- Returns:
- usage message
-
getDistLoadFileSemanticsUsage
public static java.lang.String getDistLoadFileSemanticsUsage()
Get usage of distributed load in file semantics.- Returns:
- usage message
-
distributedLoad
public static int distributedLoad(AbstractDistributedJobCommand command, org.apache.commons.cli.CommandLine cl, java.lang.String pathStr) throws alluxio.exception.AlluxioException, java.io.IOException
Run the actual distributedLoad command.- Parameters:
command- Distributed Load command instancecl- CommandLine instance of commandpathStr- path to be loaded- Returns:
- the result of running the command
- Throws:
alluxio.exception.AlluxioExceptionjava.io.IOException
-
runDistLoad
public static long runDistLoad(AbstractDistributedJobCommand command, alluxio.AlluxioURI filePath, int replication, int batchSize, java.util.Set<java.lang.String> workerSet, java.util.Set<java.lang.String> excludedWorkerSet, java.util.Set<java.lang.String> localityIds, java.util.Set<java.lang.String> excludedLocalityIds, boolean directCache)
Run the actual distributedLoad command.- Parameters:
command- Distributed Load command instancefilePath- file path to loadreplication- Number of block replicas of each loaded filebatchSize- Batch size for loadingworkerSet- A set of worker hosts to load dataexcludedWorkerSet- A set of worker hosts can not to load datalocalityIds- The locality identify setexcludedLocalityIds- A set of worker locality identify can not to load datadirectCache- use direct cache request or cache through read- Returns:
- job Control ID
-
-