*/
public class ConfiguringReduceSideJoinDriver {
public static void main(String[] args) throws Exception {
Splitter splitter = Splitter.on('/');
StringBuilder filePaths = new StringBuilder();
InputStream inputStream = new FileInputStream(new File("./jobs/join-config.properties"));
Properties properties = new Properties();
properties.load(inputStream);
Configuration config = new Configuration();
StringBuilder builder = new StringBuilder();
String defaultMapConfig = "keyIndex=0&separator=,";
for (int i = 0; i < args.length - 1; i++) {
String fileName = Iterables.getLast(splitter.split(args[i]));
String mapConfig = properties.getProperty(fileName, defaultMapConfig);
builder.append(mapConfig).append("&joinDelimiter=,&joinOrder=").append(i + 1);
config.set(fileName, builder.toString());
builder.setLength(0);
filePaths.append(args[i]).append(",");