public static void configure ( Job conf , SimpleConfiguration config ) { try { FluoConfiguration fconfig = new FluoConfiguration ( config ) ; try ( Environment env = new Environment ( fconfig ) ) { long ts = env . getSharedResources ( ) . getTimestampTracker ( ) . allocateTimestamp ( ) . getTxTimestamp ( ) ; conf . getConfiguration ( ) . setLong ( TIMESTAMP_CONF_KEY , ts ) ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; config . save ( baos ) ; conf . getConfiguration ( ) . set ( PROPS_CONF_KEY , new String ( baos . toByteArray ( ) , StandardCharsets . UTF_8 ) ) ; AccumuloInputFormat . setZooKeeperInstance ( conf , fconfig . getAccumuloInstance ( ) , fconfig . getAccumuloZookeepers ( ) ) ; AccumuloInputFormat . setConnectorInfo ( conf , fconfig . getAccumuloUser ( ) , new PasswordToken ( fconfig . getAccumuloPassword ( ) ) ) ; AccumuloInputFormat . setInputTableName ( conf , env . getTable ( ) ) ; AccumuloInputFormat . setScanAuthorizations ( conf , env . getAuthorizations ( ) ) ; } } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Configure properties needed to connect to a Fluo application