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

Method generateURI

test/org/apache/pig/test/Util.java:778–791  ·  view source on GitHub ↗
(String filename, PigContext context)

Source from the content-addressed store, hash-verified

776 }
777
778 public static String generateURI(String filename, PigContext context)
779 throws IOException {
780 if(Util.WINDOWS){
781 filename = filename.replace('\\','/');
782 }
783 if (context.getExecType() == ExecType.MAPREDUCE || context.getExecType().name().equals("TEZ") ||
784 context.getExecType().name().equals("SPARK")) {
785 return FileLocalizer.hadoopify(filename, context);
786 } else if (context.getExecType().isLocal()) {
787 return filename;
788 } else {
789 throw new IllegalStateException("ExecType: " + context.getExecType());
790 }
791 }
792
793 public static Object getPigConstant(String pigConstantAsString) throws ParserException {
794 QueryParserDriver queryParser = new QueryParserDriver( new PigContext(),

Callers 15

testLookupInFilesMethod · 0.95
testCompressed1Method · 0.95
testCompressed2Method · 0.95
testSimpleCountMethod · 0.95
testGroupCountMethod · 0.95
testGroupReorderCountMethod · 0.95
createInputFileMethod · 0.95
testJoinMethod · 0.95

Calls 6

hadoopifyMethod · 0.95
replaceMethod · 0.65
nameMethod · 0.65
isLocalMethod · 0.65
getExecTypeMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected