org.apache.hadoop.hbase.mapred.TableOutputFormat Java Examples
The following examples show how to use
org.apache.hadoop.hbase.mapred.TableOutputFormat.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HBaseIndexDirectMapperBase.java From hgraphdb with Apache License 2.0 | 6 votes |
@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context); final Configuration configuration = context.getConfiguration(); skipWAL = configuration.getBoolean(Constants.MAPREDUCE_INDEX_SKIP_WAL, false); TableName outputTable = TableName.valueOf(configuration.get(TableOutputFormat.OUTPUT_TABLE)); BufferedMutator.ExceptionListener listener = (e, mutator) -> { for (int i = 0; i < e.getNumExceptions(); i++) { LOG.warn("Failed to send put: " + e.getRow(i)); } }; BufferedMutatorParams mutatorParms = new BufferedMutatorParams(outputTable).listener(listener); mutator = getGraph().connection().getBufferedMutator(mutatorParms); }
Example #2
Source File: HBaseRawScheme.java From SpyGlass with Apache License 2.0 | 4 votes |
@Override public void sinkConfInit(FlowProcess<JobConf> process, Tap<JobConf, RecordReader, OutputCollector> tap, JobConf conf) { conf.setOutputFormat(TableOutputFormat.class); conf.setOutputKeyClass(ImmutableBytesWritable.class); conf.setOutputValueClass(Put.class); }