exporterEnabled = DEFAULT_EXPORTER_ENABLED;
valid = false;
}
boolean mr370applied = checkClassExists("org.apache.hadoop.mapreduce.lib.output.MultipleOutputs");
for (OutputDescription output : outputs) {
FileExporterDescription desc = extract(output);
if (exporterEnabled == GenericOptionValue.DISABLED) {
valid = false;
getEnvironment().error(
"出力{0}を利用するにはコンパイルオプション\"{1}={2}\"の指定が必要です",
desc.getClass().getName(),
getEnvironment().getOptions().getExtraAttributeKeyName(OPTION_EXPORTER_ENABLED),
GenericOptionValue.ENABLED.getSymbol());
} else if (mr370applied == false && exporterEnabled == GenericOptionValue.AUTO) {
valid = false;
getEnvironment().error(
"現在のディストリビューションは{1}に対応していません。"
+ "別のディストリビューションを利用するか、{2}に置き換えてください (出力{0})。",
desc.getClass().getName(),
FileExporterDescription.class.getSimpleName(),
"DirectFileOutputDescription (directio)");
}
String pathPrefix = desc.getPathPrefix();
if (pathPrefix == null) {
valid = false;
getEnvironment().error(
"{0}のパスが指定されていません",
desc.getClass().getName());
} else {
Location location = Location.fromPath(pathPrefix, '/');
if (location.isPrefix() == false) {
valid = false;
getEnvironment().error(
"{0}はパスの接尾辞(-*)でなければなりません: {1}",
desc.getClass().getName(),
pathPrefix);
}
if (location.getParent() == null) {
valid = false;
getEnvironment().error(
"{0}には最低ひとつのディレクトリの指定が必要です: {1}",
desc.getClass().getName(),
pathPrefix);
}
if (VALID_OUTPUT_NAME.matcher(location.getName()).matches() == false) {
valid = false;
getEnvironment().error(
"{0}のファイル名(末尾のセグメント)は英数字のみ利用できます: {1}",
desc.getClass().getName(),
pathPrefix);
}
}
}
return valid;