Esempio n. 1
0
 /** {@inheritDoc} */
 @Override
 protected void cleanup(Context context) throws IOException {
   Preconditions.checkState(mProducerContext != null);
   mProducer.cleanup(mProducerContext);
   mProducerContext.close();
   mProducerContext = null;
   super.cleanup(context);
 }
Esempio n. 2
0
  /** {@inheritDoc} */
  @Override
  protected void setup(Context context) throws IOException {
    super.setup(context);
    Preconditions.checkState(mProducerContext == null);
    final Configuration conf = context.getConfiguration();
    mProducer = KijiProducers.create(conf);

    final String column = Preconditions.checkNotNull(mProducer.getOutputColumn());
    mOutputColumn = new KijiColumnName(column);

    mProducerContext = InternalProducerContext.create(context, mOutputColumn);
    mProducer.setup(mProducerContext);
  }