@Override protected void initialize(JobContext context) throws IOException { // Do we have to worry about mis-matches between the Configuration from setConf and the one // in this context? TableName tableName = TableName.valueOf(conf.get(INPUT_TABLE)); try { initializeTable(ConnectionFactory.createConnection(new Configuration(conf)), tableName); } catch (Exception e) { LOG.error(StringUtils.stringifyException(e)); } }
@Override protected void initializeTable(Connection connection, TableName tableName) throws IOException { super.initializeTable(connection, tableName); ConnectionForMergeTesting cft = (ConnectionForMergeTesting) connection; sizeCalculator = cft.getRegionSizeCalculator(); }
@Override protected void initialize(JobContext context) throws IOException { // Do we have to worry about mis-matches between the Configuration from setConf and the one // in this context? TableName tableName = TableName.valueOf(conf.get(INPUT_TABLE)); try { initializeTable(ConnectionFactory.createConnection(new Configuration(conf)), tableName); } catch (Exception e) { LOG.error(StringUtils.stringifyException(e)); } }
@Override protected void initialize(JobContext context) throws IOException { // Do we have to worry about mis-matches between the Configuration from setConf and the one // in this context? TableName tableName = TableName.valueOf(conf.get(INPUT_TABLE)); try { initializeTable(ConnectionFactory.createConnection(new Configuration(conf)), tableName); } catch (Exception e) { LOG.error(StringUtils.stringifyException(e)); } }
@Override protected void initialize(JobContext context) throws IOException { // Do we have to worry about mis-matches between the Configuration from setConf and the one // in this context? TableName tableName = TableName.valueOf(conf.get(INPUT_TABLE)); try { initializeTable(ConnectionFactory.createConnection(new Configuration(conf)), tableName); } catch (Exception e) { LOG.error(StringUtils.stringifyException(e)); } }
@Override protected void initializeTable(Connection connection, TableName tableName) throws java.io.IOException { if (isMock()) { this.table = connection.getTable(tableName); } else { super.initializeTable(connection, tableName); } this.connection = connection; }
@Override protected void initializeTable(Connection connection, TableName tableName) throws IOException { super.initializeTable(connection, tableName); ConnectionForMergeTesting cft = (ConnectionForMergeTesting) connection; sizeCalculator = cft.getRegionSizeCalculator(); }