@VisibleForTesting static DefaultHBaseKeyFactory forTest(LazySerDeParameters params, ColumnMappings mappings) { DefaultHBaseKeyFactory factory = new DefaultHBaseKeyFactory(); factory.serdeParams = params; factory.keyMapping = mappings.getKeyMapping(); return factory; } }
@Override public void configureJobConf(TableDesc tableDesc, JobConf jobConf) throws IOException { super.configureJobConf(tableDesc, jobConf); TableMapReduceUtil.addDependencyJars(jobConf, keyClass); }
@VisibleForTesting LazyHBaseRow(LazySimpleStructObjectInspector oi, ColumnMappings columnMappings) { super(oi); this.keyFactory = DefaultHBaseKeyFactory.forTest(null, columnMappings); this.valueFactories = null; this.columnsMapping = columnMappings.getColumnsMapping(); }
private static HBaseKeyFactory createKeyFactory(Configuration job, Properties tbl) throws Exception { String factoryClassName = tbl.getProperty(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY); if (factoryClassName != null) { Class<?> factoryClazz = loadClass(factoryClassName, job); return (HBaseKeyFactory) ReflectionUtils.newInstance(factoryClazz, job); } String keyClassName = tbl.getProperty(HBaseSerDe.HBASE_COMPOSITE_KEY_CLASS); if (keyClassName != null) { Class<?> keyClass = loadClass(keyClassName, job); return new CompositeHBaseKeyFactory(keyClass); } return new DefaultHBaseKeyFactory(); }
@VisibleForTesting LazyHBaseRow(LazySimpleStructObjectInspector oi, ColumnMappings columnMappings) { super(oi); this.keyFactory = DefaultHBaseKeyFactory.forTest(null, columnMappings); this.valueFactories = null; this.columnsMapping = columnMappings.getColumnsMapping(); }
@Override public void configureJobConf(TableDesc tableDesc, JobConf jobConf) throws IOException { super.configureJobConf(tableDesc, jobConf); TableMapReduceUtil.addDependencyJars(jobConf, keyClass); }
@VisibleForTesting static DefaultHBaseKeyFactory forTest(LazySerDeParameters params, ColumnMappings mappings) { DefaultHBaseKeyFactory factory = new DefaultHBaseKeyFactory(); factory.serdeParams = params; factory.keyMapping = mappings.getKeyMapping(); return factory; } }
private static HBaseKeyFactory createKeyFactory(Configuration job, Properties tbl) throws Exception { String factoryClassName = tbl.getProperty(HBaseSerDe.HBASE_COMPOSITE_KEY_FACTORY); if (factoryClassName != null) { Class<?> factoryClazz = loadClass(factoryClassName, job); return (HBaseKeyFactory) ReflectionUtils.newInstance(factoryClazz, job); } String keyClassName = tbl.getProperty(HBaseSerDe.HBASE_COMPOSITE_KEY_CLASS); if (keyClassName != null) { Class<?> keyClass = loadClass(keyClassName, job); return new CompositeHBaseKeyFactory(keyClass); } return new DefaultHBaseKeyFactory(); }