use of org.apache.sysml.runtime.transform.TfUtils in project incubator-systemml by apache.
the class CSVAssignRowIDMapper method configure.
@Override
@SuppressWarnings("deprecation")
public void configure(JobConf job) {
byte thisIndex;
try {
//it doesn't make sense to have repeated file names in the input, since this is for reblock
thisIndex = MRJobConfiguration.getInputMatrixIndexesInMapper(job).get(0);
outKey.set(thisIndex);
Path thisPath = new Path(job.get(MRConfigurationNames.MR_MAP_INPUT_FILE));
FileSystem fs = IOUtilFunctions.getFileSystem(thisPath, job);
thisPath = thisPath.makeQualified(fs);
filename = thisPath.toString();
String[] strs = job.getStrings(CSVReblockMR.SMALLEST_FILE_NAME_PER_INPUT);
Path headerPath = new Path(strs[thisIndex]).makeQualified(fs);
headerFile = headerPath.toString().equals(filename);
CSVReblockInstruction[] reblockInstructions = MRJobConfiguration.getCSVReblockInstructions(job);
for (CSVReblockInstruction ins : reblockInstructions) if (ins.input == thisIndex) {
delim = Pattern.quote(ins.delim);
ignoreFirstLine = ins.hasHeader;
break;
}
// load properties relevant to transform
boolean omit = job.getBoolean(MRJobConfiguration.TF_TRANSFORM, false);
if (omit)
_agents = new TfUtils(job, true);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations