break;
}
Thread.sleep(1000);
}
TajoConf conf = util.getConfiguration();
TajoClient client = new TajoClient(conf);
FileSystem fs = util.getDefaultFileSystem();
Path rootDir = util.getMaster().
getStorageManager().getWarehouseDir();
fs.mkdirs(rootDir);
for (int i = 0; i < names.length; i++) {
Path tablePath = new Path(rootDir, names[i]);
fs.mkdirs(tablePath);
Path dfsPath = new Path(tablePath, names[i] + ".tbl");
FSDataOutputStream out = fs.create(dfsPath);
for (int j = 0; j < tables[i].length; j++) {
out.write((tables[i][j]+"\n").getBytes());
}
out.close();
TableMeta meta = CatalogUtil.newTableMeta(CatalogProtos.StoreType.CSV, option);
client.createExternalTable(names[i], schemas[i], tablePath, meta);
}
Thread.sleep(1000);
ResultSet res = client.executeQueryAndGetResult(query);
return res;
}