@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context); final Configuration configuration = context.getConfiguration(); writer = new DirectHTableWriter(configuration); try { final Properties overrideProps = new Properties(); String scn = configuration.get(PhoenixConfigurationUtil.CURRENT_SCN_VALUE); String txScnValue = configuration.get(PhoenixConfigurationUtil.TX_SCN_VALUE); if(txScnValue==null && scn!=null) { overrideProps.put(PhoenixRuntime.BUILD_INDEX_AT_ATTRIB, scn); } connection = ConnectionUtil.getOutputConnection(configuration, overrideProps).unwrap(PhoenixConnection.class); connection.setAutoCommit(false); // Get BatchSize ConnectionQueryServices services = connection.getQueryServices(); int maxSize = services.getProps().getInt(QueryServices.MAX_MUTATION_SIZE_ATTRIB, QueryServicesOptions.DEFAULT_MAX_MUTATION_SIZE); batchSize = Math.min(connection.getMutateBatchSize(), maxSize); LOG.info("Mutation Batch Size = " + batchSize); this.mutations = Lists.newArrayListWithExpectedSize(batchSize); maintainers=new ImmutableBytesPtr(PhoenixConfigurationUtil.getIndexMaintainers(configuration)); } catch (SQLException e) { throw new RuntimeException(e.getMessage()); } }
super.cleanup(context); } catch (SQLException e) { LOG.error(" Error {} while read/write of a record ", e.getMessage());
@Override protected void setup(Context context) throws IOException, InterruptedException { numBatches = context.getConfiguration().getInt(NUM_BATCHES, 0); batchSize = context.getConfiguration().getInt(BATCH_SIZE, 0); super.setup(context); }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { super.cleanup(context); graph.close(); } }
@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context); String minCreationTimeParam = context.getConfiguration().get(HUT_ROLLBACK_UPDATE_MIN_TIME_ATTR); if (minCreationTimeParam != null) { minCreationTime = Long.valueOf(minCreationTimeParam); } String maxCreationTimeParam = context.getConfiguration().get(HUT_ROLLBACK_UPDATE_MAX_TIME_ATTR); if (maxCreationTimeParam != null) { maxCreationTime = Long.valueOf(maxCreationTimeParam); } } }
@Override protected void cleanup(Context context) throws IOException, InterruptedException { super.cleanup(context); try { task.post(); } finally { updateStats(context); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); for (HBaseToSfProtosFilter filter:filters) { filter.setupFilterFromContext(context); } }
super.cleanup(context); } catch (SQLException e) { LOG.error(" Error {} while read/write of a record ", e.getMessage());
@Override protected void setup(Mapper<ImmutableBytesWritable, Result, KEYOUT, VALUEOUT>.Context context) throws IOException, InterruptedException { super.setup(context); mrHelper.set(new VariantsTableMapReduceHelper(context)); }
super.cleanup(context); } catch (SQLException e) { LOG.error(" Error {} while read/write of a record ", e.getMessage());
@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context); final Configuration configuration = context.getConfiguration(); ElementType indexType = ElementType.valueOf(configuration.get(Constants.MAPREDUCE_INDEX_TYPE)); String label = configuration.get(Constants.MAPREDUCE_INDEX_LABEL); String propertyKey = configuration.get(Constants.MAPREDUCE_INDEX_PROPERTY_KEY); graph = new HBaseGraph(new HBaseGraphConfiguration(configuration)); index = graph.getIndex(OperationType.REMOVE, indexType, label, propertyKey); }
super.cleanup(context);
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context);
@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context); final Configuration configuration = context.getConfiguration(); writer = new DirectHTableWriter(configuration); try { final Properties overrideProps = new Properties(); String scn = configuration.get(PhoenixConfigurationUtil.CURRENT_SCN_VALUE); String txScnValue = configuration.get(PhoenixConfigurationUtil.TX_SCN_VALUE); if(txScnValue==null && scn!=null) { overrideProps.put(PhoenixRuntime.BUILD_INDEX_AT_ATTRIB, scn); } connection = ConnectionUtil.getOutputConnection(configuration, overrideProps).unwrap(PhoenixConnection.class); connection.setAutoCommit(false); // Get BatchSize ConnectionQueryServices services = connection.getQueryServices(); int maxSize = services.getProps().getInt(QueryServices.MAX_MUTATION_SIZE_ATTRIB, QueryServicesOptions.DEFAULT_MAX_MUTATION_SIZE); batchSize = Math.min(connection.getMutateBatchSize(), maxSize); LOG.info("Mutation Batch Size = " + batchSize); this.mutations = Lists.newArrayListWithExpectedSize(batchSize); maintainers=new ImmutableBytesPtr(PhoenixConfigurationUtil.getIndexMaintainers(configuration)); } catch (SQLException e) { throw new RuntimeException(e.getMessage()); } }
@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context);
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context);
@Override protected void setup(final Context context) throws IOException, InterruptedException { super.setup(context); final Configuration configuration = context.getConfiguration(); writer = new DirectHTableWriter(configuration); try { final Properties overrideProps = new Properties(); String scn = configuration.get(PhoenixConfigurationUtil.CURRENT_SCN_VALUE); String txScnValue = configuration.get(PhoenixConfigurationUtil.TX_SCN_VALUE); if(txScnValue==null && scn!=null) { overrideProps.put(PhoenixRuntime.BUILD_INDEX_AT_ATTRIB, scn); } connection = ConnectionUtil.getOutputConnection(configuration, overrideProps).unwrap(PhoenixConnection.class); connection.setAutoCommit(false); // Get BatchSize ConnectionQueryServices services = connection.getQueryServices(); int maxSize = services.getProps().getInt(QueryServices.MAX_MUTATION_SIZE_ATTRIB, QueryServicesOptions.DEFAULT_MAX_MUTATION_SIZE); batchSize = Math.min(connection.getMutateBatchSize(), maxSize); LOG.info("Mutation Batch Size = " + batchSize); this.mutations = Lists.newArrayListWithExpectedSize(batchSize); maintainers=new ImmutableBytesPtr(PhoenixConfigurationUtil.getIndexMaintainers(configuration)); } catch (SQLException e) { throw new RuntimeException(e.getMessage()); } }
@Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); VariantTableHelper helper = new VariantTableHelper(context.getConfiguration()); StudyConfiguration studyConfiguration = helper.readStudyConfiguration(); boolean overwrite = FillGapsFromArchiveMapper.isOverwrite(context.getConfiguration()); task = new FillMissingFromArchiveTask(studyConfiguration, helper, overwrite); task.setQuiet(true); task.pre(); }