このプロパティファイルは、次のように分散キャッシュに追加できます。
...
String s3PropertiesFilePath = args[0];
DistributedCache.addCacheFile(new URI(s3PropertiesFilePath), conf);
...
後で、マッパー/リデューサーのconfigure()で、次の操作を実行できます。
...
Path s3PropertiesFilePath;
Properties prop = new Properties();
@Override
public void configure(JobConf job) {
s3PropertiesFilePath = DistributedCache.getLocalCacheFiles(job)[0];
//load the properties file
prop.load(new FileInputStream(s3PropertiesFilePath.toString()));
...
}
PS: Amazon EMRで実行していない場合は、このプロパティファイルをhdfsに保持し、代わりにそのパスを指定できます。