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

Method getExamples

src/org/apache/pig/PigServer.java:1370–1399  ·  view source on GitHub ↗
(String alias)

Source from the content-addressed store, hash-verified

1368 }
1369
1370 public Map<Operator, DataBag> getExamples(String alias) throws IOException {
1371 try {
1372 if (currDAG.isBatchOn() && alias != null) {
1373 currDAG.parseQuery();
1374 currDAG.buildPlan( null );
1375 execute();
1376 }
1377 currDAG.parseQuery();
1378 currDAG.skipStores();
1379 currDAG.buildPlan( alias );
1380 currDAG.compile();
1381 } catch (IOException e) {
1382 //Since the original script is parsed anyway, there should not be an
1383 //error in this parsing. The only reason there can be an error is when
1384 //the files being loaded in load don't exist anymore.
1385 e.printStackTrace();
1386 }
1387
1388 ExampleGenerator exgen = new ExampleGenerator( currDAG.lp, pigContext );
1389 try {
1390 return exgen.getExamples();
1391 } catch (ExecException e) {
1392 e.printStackTrace(System.out);
1393 throw new IOException("ExecException" , e);
1394 } catch (Exception e) {
1395 e.printStackTrace(System.out);
1396 throw new IOException("Exception ", e);
1397 }
1398
1399 }
1400
1401 public void printHistory(boolean withNumbers) {
1402

Callers 15

testLoadMethod · 0.95
testFilterMethod · 0.95
testFilter2Method · 0.95
testFilter3Method · 0.95
testForeachMethod · 0.95
testJoinMethod · 0.95
testJoin2Method · 0.95
testCogroupMethod · 0.95
testGroupMethod · 0.95

Calls 7

executeMethod · 0.95
getExamplesMethod · 0.95
parseQueryMethod · 0.80
skipStoresMethod · 0.80
isBatchOnMethod · 0.45
buildPlanMethod · 0.45
compileMethod · 0.45

Tested by 15

testLoadMethod · 0.76
testFilterMethod · 0.76
testFilter2Method · 0.76
testFilter3Method · 0.76
testForeachMethod · 0.76
testJoinMethod · 0.76
testJoin2Method · 0.76
testCogroupMethod · 0.76
testGroupMethod · 0.76