MCPcopy Create free account
hub / github.com/apache/pig / testStorerLimit

Method testStorerLimit

test/org/apache/pig/test/TestMRCompiler.java:1266–1284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1264
1265 //PIG-2146
1266 @Test
1267 public void testStorerLimit() throws Exception {
1268 // test if the POStore in the 1st mr plan
1269 // use the right StoreFunc
1270 String query = "a = load 'input1';" +
1271 "b = limit a 10;" +
1272 "store b into 'output' using " + PigStorageNoDefCtor.class.getName() + "(',');";
1273
1274 PhysicalPlan pp = Util.buildPp(pigServer, query);
1275 MROperPlan mrPlan = Util.buildMRPlan(pp, pc);
1276
1277 LimitAdjuster la = new LimitAdjuster(mrPlan, pc);
1278 la.visit();
1279 la.adjust();
1280
1281 MapReduceOper firstMrOper = mrPlan.getRoots().get(0);
1282 POStore store = (POStore)firstMrOper.reducePlan.getLeaves().get(0);
1283 assertEquals(store.getStoreFunc().getClass().getName(), "org.apache.pig.impl.io.InterStorage");
1284 }
1285
1286 // See PIG-4538
1287 @Test

Callers

nothing calls this directly

Calls 11

buildPpMethod · 0.95
buildMRPlanMethod · 0.95
adjustMethod · 0.95
getStoreFuncMethod · 0.95
getRootsMethod · 0.80
getClassMethod · 0.80
getMethod · 0.65
getNameMethod · 0.45
visitMethod · 0.45
getLeavesMethod · 0.45
assertEqualsMethod · 0.45

Tested by

no test coverage detected