LinkedHashMap<String, Operator<? extends OperatorDesc>> ao =
new LinkedHashMap<String, Operator<? extends OperatorDesc>>();
ao.put("a", op);
MapredWork mrwork = new MapredWork();
mrwork.getMapWork().setPathToAliases(pa);
mrwork.getMapWork().setPathToPartitionInfo(pt);
mrwork.getMapWork().setAliasToWork(ao);
// serialize the configuration once ..
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Utilities.serializeObject(mrwork, baos);
baos.close();
String v1 = baos.toString();
// store into configuration
JobConf job = new JobConf(TestPlan.class);
job.set("fs.default.name", "file:///");
Utilities.setMapRedWork(job, mrwork, System.getProperty("java.io.tmpdir") + File.separator +
System.getProperty("user.name") + File.separator + "hive");
MapredWork mrwork2 = Utilities.getMapRedWork(job);
Utilities.clearWork(job);
// over here we should have some checks of the deserialized object against
// the orginal object
// System.out.println(v1);