private void setOutputPath(DataStore<K,T> store, TaskAttemptContext context) { if(store instanceof FileBackedDataStore) { FileBackedDataStore<K, T> fileStore = (FileBackedDataStore<K, T>) store; String uniqueName = FileOutputFormat.getUniqueFile(context, "part", ""); //if file store output is not set, then get the output from FileOutputFormat if(fileStore.getOutputPath() == null) { fileStore.setOutputPath(FileOutputFormat.getOutputPath(context).toString()); } //set the unique name of the data file String path = fileStore.getOutputPath(); fileStore.setOutputPath( path + Path.SEPARATOR + uniqueName); } }
private void setOutputPath(DataStore<K,T> store, TaskAttemptContext context) { if(store instanceof FileBackedDataStore) { FileBackedDataStore<K, T> fileStore = (FileBackedDataStore<K, T>) store; String uniqueName = FileOutputFormat.getUniqueFile(context, "part", ""); //if file store output is not set, then get the output from FileOutputFormat if(fileStore.getOutputPath() == null) { fileStore.setOutputPath(FileOutputFormat.getOutputPath(context).toString()); } //set the unique name of the data file String path = fileStore.getOutputPath(); fileStore.setOutputPath( path + Path.SEPARATOR + uniqueName); } }