(PrimitiveTypeInfo) typeInfo, lazyParams); case MAP: return LazyObjectInspectorFactory.getLazySimpleMapObjectInspector( createLazyObjectInspector(((MapTypeInfo) typeInfo).getMapKeyTypeInfo(), separatorIndex + 2, lazyParams, option), lazyParams); case LIST: return LazyObjectInspectorFactory.getLazySimpleListObjectInspector( createLazyObjectInspector(((ListTypeInfo) typeInfo) .getListElementTypeInfo(), separatorIndex + 1, .get(i), separatorIndex + 1, lazyParams, option)); return LazyObjectInspectorFactory.getLazySimpleStructObjectInspector( fieldNames, fieldObjectInspectors, null, LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex), separatorIndex + 1, lazyParams, option)); return LazyObjectInspectorFactory.getLazyUnionObjectInspector(lazyOIs, LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex), lazyParams);
public static LazyUnionObjectInspector getLazyUnionObjectInspector( List<ObjectInspector> ois, byte separator, LazyObjectInspectorParameters lazyParams) { List<Object> signature = new ArrayList<Object>(); signature.add(ois); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); LazyUnionObjectInspector result = cachedLazyUnionObjectInspector .get(signature); if (result == null) { result = new LazyUnionObjectInspector(ois, separator, lazyParams); LazyUnionObjectInspector prev = cachedLazyUnionObjectInspector.putIfAbsent(signature, result); if (prev != null) { result = prev; } } return result; }
@Deprecated public static LazySimpleStructObjectInspector getLazySimpleStructObjectInspector( List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structFieldComments, byte separator, Text nullSequence, boolean lastColumnTakesRest, boolean escaped, byte escapeChar) { return getLazySimpleStructObjectInspector(structFieldNames, structFieldObjectInspectors, structFieldComments, separator, nullSequence, lastColumnTakesRest, escaped, escapeChar, ObjectInspectorOptions.JAVA); }
@Deprecated public static LazyMapObjectInspector getLazySimpleMapObjectInspector( ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector, byte itemSeparator, byte keyValueSeparator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazySimpleMapObjectInspector(mapKeyObjectInspector, mapValueObjectInspector, itemSeparator, keyValueSeparator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
@Deprecated public static LazyUnionObjectInspector getLazyUnionObjectInspector( List<ObjectInspector> ois, byte separator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazyUnionObjectInspector(ois, separator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
@Deprecated public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazySimpleListObjectInspector(listElementObjectInspector, separator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
@Deprecated public static LazySimpleStructObjectInspector getLazySimpleStructObjectInspector( List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, byte separator, Text nullSequence, boolean lastColumnTakesRest, boolean escaped, byte escapeChar) { return getLazySimpleStructObjectInspector(structFieldNames, structFieldObjectInspectors, null, separator, nullSequence, lastColumnTakesRest, escaped, escapeChar, ObjectInspectorOptions.JAVA); }
public static void assertMapDecode(String encodedMap, Map<? extends Object, ? extends Object> expectedMap) { LazyMap lazyMap = (LazyMap) createLazyObject(getLazySimpleMapObjectInspector( LAZY_STRING_OBJECT_INSPECTOR, getLazyStringObjectInspector(false, (byte) 0), (byte) 2, (byte) 3, new Text("\\N"), false, (byte) 0)); lazyMap.init(newByteArrayRef(encodedMap), 0, encodedMap.length()); Map<Object, Object> map = lazyMap.getMap(); assertEquals(map, expectedMap); }
@Deprecated public static LazyUnionObjectInspector getLazyUnionObjectInspector( List<ObjectInspector> ois, byte separator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazyUnionObjectInspector(ois, separator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
@Deprecated public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazySimpleListObjectInspector(listElementObjectInspector, separator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
escapeChar); case MAP: return LazyObjectInspectorFactory.getLazySimpleMapObjectInspector( createLazyObjectInspector(((MapTypeInfo) typeInfo) .getMapKeyTypeInfo(), separator, separatorIndex + 2, nullSequence, escaped, escapeChar); case LIST: return LazyObjectInspectorFactory.getLazySimpleListObjectInspector( createLazyObjectInspector(((ListTypeInfo) typeInfo) .getListElementTypeInfo(), separator, separatorIndex + 1, escapeChar)); return LazyObjectInspectorFactory.getLazySimpleStructObjectInspector( fieldNames, fieldObjectInspectors, separator[separatorIndex], nullSequence, false, escaped, escapeChar); escapeChar)); return LazyObjectInspectorFactory.getLazyUnionObjectInspector(lazyOIs, separator[separatorIndex], nullSequence, escaped, escapeChar);
@Deprecated public static LazySimpleStructObjectInspector getLazySimpleStructObjectInspector( List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, byte separator, Text nullSequence, boolean lastColumnTakesRest, boolean escaped, byte escapeChar, ObjectInspectorOptions option) { return getLazySimpleStructObjectInspector(structFieldNames, structFieldObjectInspectors, null, separator, nullSequence, lastColumnTakesRest, escaped, escapeChar, option); }
@Deprecated public static LazyMapObjectInspector getLazySimpleMapObjectInspector( ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector, byte itemSeparator, byte keyValueSeparator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazySimpleMapObjectInspector(mapKeyObjectInspector, mapValueObjectInspector, itemSeparator, keyValueSeparator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, LazyObjectInspectorParameters lazyParams) { ArrayList<Object> signature = new ArrayList<Object>(); signature.add(listElementObjectInspector); signature.add(Byte.valueOf(separator)); signature.add(lazyParams.getNullSequence().toString()); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); LazyListObjectInspector result = cachedLazySimpleListObjectInspector .get(signature); if (result == null) { result = new LazyListObjectInspector(listElementObjectInspector, separator, lazyParams); LazyListObjectInspector prev = cachedLazySimpleListObjectInspector.putIfAbsent(signature, result); if (prev != null) { result = prev; } } return result; }
@Deprecated public static LazyUnionObjectInspector getLazyUnionObjectInspector( List<ObjectInspector> ois, byte separator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazyUnionObjectInspector(ois, separator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
@Deprecated public static LazyListObjectInspector getLazySimpleListObjectInspector( ObjectInspector listElementObjectInspector, byte separator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazySimpleListObjectInspector(listElementObjectInspector, separator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
(PrimitiveTypeInfo) typeInfo, lazyParams); case MAP: return LazyObjectInspectorFactory.getLazySimpleMapObjectInspector( createLazyObjectInspector(((MapTypeInfo) typeInfo).getMapKeyTypeInfo(), separatorIndex + 2, lazyParams, option), lazyParams); case LIST: return LazyObjectInspectorFactory.getLazySimpleListObjectInspector( createLazyObjectInspector(((ListTypeInfo) typeInfo) .getListElementTypeInfo(), separatorIndex + 1, .get(i), separatorIndex + 1, lazyParams, option)); return LazyObjectInspectorFactory.getLazySimpleStructObjectInspector( fieldNames, fieldObjectInspectors, null, LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex), separatorIndex + 1, lazyParams, option)); return LazyObjectInspectorFactory.getLazyUnionObjectInspector(lazyOIs, LazyUtils.getSeparator(lazyParams.getSeparators(), separatorIndex), lazyParams);
@Deprecated public static LazySimpleStructObjectInspector getLazySimpleStructObjectInspector( List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structFieldComments, byte separator, Text nullSequence, boolean lastColumnTakesRest, boolean escaped,byte escapeChar, ObjectInspectorOptions option) { return getLazySimpleStructObjectInspector(structFieldNames, structFieldObjectInspectors, structFieldComments, separator, new LazyObjectInspectorParametersImpl( escaped, escapeChar, false, null, null, nullSequence, lastColumnTakesRest), option); }
@Deprecated public static LazyMapObjectInspector getLazySimpleMapObjectInspector( ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector, byte itemSeparator, byte keyValueSeparator, Text nullSequence, boolean escaped, byte escapeChar) { return getLazySimpleMapObjectInspector(mapKeyObjectInspector, mapValueObjectInspector, itemSeparator, keyValueSeparator, new LazyObjectInspectorParametersImpl(escaped, escapeChar, false, null, null, nullSequence)); }
public static LazyMapObjectInspector getLazySimpleMapObjectInspector( ObjectInspector mapKeyObjectInspector, ObjectInspector mapValueObjectInspector, byte itemSeparator, byte keyValueSeparator, LazyObjectInspectorParameters lazyParams) { ArrayList<Object> signature = new ArrayList<Object>(); signature.add(mapKeyObjectInspector); signature.add(mapValueObjectInspector); signature.add(Byte.valueOf(itemSeparator)); signature.add(Byte.valueOf(keyValueSeparator)); signature.add(lazyParams.getNullSequence().toString()); LazyObjectInspectorFactory.addCommonLazyParamsToSignature(lazyParams, signature); LazyMapObjectInspector result = cachedLazySimpleMapObjectInspector .get(signature); if (result == null) { result = new LazyMapObjectInspector(mapKeyObjectInspector, mapValueObjectInspector, itemSeparator, keyValueSeparator, lazyParams); LazyMapObjectInspector prev = cachedLazySimpleMapObjectInspector.putIfAbsent(signature, result); if (prev != null) { result = prev; } } return result; }