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

Method init

test/org/apache/pig/test/utils/FILTERFROMFILE.java:62–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62 private void init() throws IOException {
63
64 lookupTable = new HashMap<String, Boolean>();
65
66 Properties props = ConfigurationUtil.toProperties(PigMapReduce.sJobConfInternal.get());
67 InputStream is = FileLocalizer.openDFSFile(FilterFileName, props);
68
69 BufferedReader reader = new BufferedReader(new InputStreamReader(is));
70
71 while (true){
72 String line = reader.readLine();
73
74 if (line == null)
75 break;
76
77 String FilterField = line.split("\t")[0];
78
79 lookupTable.put(FilterField, Boolean.TRUE);
80 }
81 }
82
83 @Override
84 public Boolean exec(Tuple input) throws IOException {

Callers 1

execMethod · 0.95

Calls 6

toPropertiesMethod · 0.95
openDFSFileMethod · 0.95
splitMethod · 0.80
getMethod · 0.65
readLineMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected