Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ via logging when the Dyno-NN has exited safemode and is ready for use.
At this point, a workload job (map-only MapReduce job) can be launched, e.g.:
```
./bin/start-workload.sh
-Dauditreplay.input-path hdfs:///dyno/audit_logs/
-Dauditreplay.num-threads 50
-Dauditreplay.input-path=hdfs:///dyno/audit_logs/
-Dauditreplay.num-threads=50
-nn_uri hdfs://namenode_address:port/
-start_time_offset 5m
-mapper_class_name AuditReplayMapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,24 @@ public static void main(String[] args) throws Exception {
}

private Class<? extends WorkloadMapper> getMapperClass(String className) throws ClassNotFoundException {
if (!className.contains(".")) {
className = WorkloadDriver.class.getPackage().getName() + "." + className;
}
Class<?> mapperClass = getConf().getClassByName(className);
if (!WorkloadMapper.class.isAssignableFrom(mapperClass)) {
throw new IllegalArgumentException(className + " is not a subclass of " +
WorkloadMapper.class.getCanonicalName());
String[] potentialQualifiedClassNames = {
WorkloadDriver.class.getPackage().getName() + "." + className,
AuditReplayMapper.class.getPackage().getName() + "." + className,
className
};
for (String qualifiedClassName : potentialQualifiedClassNames) {
Class<?> mapperClass;
try {
mapperClass = getConf().getClassByName(qualifiedClassName);
} catch (ClassNotFoundException cnfe) {
continue;
}
if (!WorkloadMapper.class.isAssignableFrom(mapperClass)) {
throw new IllegalArgumentException(className + " is not a subclass of " + WorkloadMapper.class.getCanonicalName());
}
return (Class<? extends WorkloadMapper>) mapperClass;
}
return (Class<? extends WorkloadMapper>) mapperClass;
throw new IllegalArgumentException("Unable to find workload mapper class: " + className);
}

private String getMapperUsageInfo(String mapperClassName) throws ClassNotFoundException,
Expand Down