return fileName;
}
public static void main(String[] args) throws DataSourceException {
ChukwaRecordDataSource ds = new ChukwaRecordDataSource();
SearchResult result = new ChukwaSearchResult();
result.setRecords(new TreeMap<Long, List<Record>>());
String cluster = args[0];
String dataSource = args[1];
long t0 = Long.parseLong(args[2]);
long t1 = Long.parseLong(args[3]);
String filter = null;
Token token = null;
if (args.length >= 5 && !args[4].equalsIgnoreCase("null")) {
filter = args[4];
}
if (args.length == 6) {
token = new Token();
token.key = args[5];
System.out.println("token :" + token.key);
}
System.out.println("cluster :" + cluster);
System.out.println("dataSource :" + dataSource);
System.out.println("t0 :" + t0);
System.out.println("t1 :" + t1);
System.out.println("filter :" + filter);
ds.search(result, cluster, dataSource, t0, t1, filter, token);
TreeMap<Long, List<Record>> records = result.getRecords();
Iterator<Long> it = records.keySet().iterator();
while (it.hasNext()) {
long ts = it.next();
System.out.println("\n\nTimestamp: " + new Date(ts));
List<Record> list = records.get(ts);
for (int i = 0; i < list.size(); i++) {
System.out.println(list.get(i));
}
}
if (result.getToken() != null) {
System.out.println("Key -->" + result.getToken().key);
}
}