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

Method genRandMap

test/org/apache/pig/test/utils/GenRandomData.java:51–61  ·  view source on GitHub ↗
(Random r, int numEnt)

Source from the content-addressed store, hash-verified

49 }
50
51 public static Map<String, Object> genRandMap(Random r, int numEnt) {
52 Map<String,Object> ret = new HashMap<String, Object>();
53 if(r==null){
54 ret.put("random", "RANDOM");
55 return ret;
56 }
57 for(int i=0;i<numEnt;i++){
58 ret.put(genRandString(r), new DataByteArray(genRandString(r).getBytes()));
59 }
60 return ret;
61 }
62
63 public static String genRandString(Random r){
64 if(r==null) return "RANDOM";

Callers 15

testGetNextMapMethod · 0.95
testOperatorMethod · 0.95
testMapToOtherMethod · 0.95
testMethod · 0.95
testOperatorMethod · 0.95
testOperatorMethod · 0.95
testMapLookUpMethod · 0.95
testOperatorMethod · 0.95
testBytesToMapMethod · 0.95
testMapToBytesMethod · 0.95
testOperatorMethod · 0.95
genRandSmallBagTupleMethod · 0.95

Calls 3

genRandStringMethod · 0.95
getBytesMethod · 0.65
putMethod · 0.45

Tested by

no test coverage detected