boolean updateQueue ( AppAggregationKey appAggKey , Table aggTable , JobDetails jobDetails ) throws IOException { byte [ ] rowKey = aggConv . toBytes ( appAggKey ) ; Get g = new Get ( rowKey ) ; g . addColumn ( AggregationConstants . INFO_FAM_BYTES , AggregationConstants . HRAVEN_QUEUE_BYTES ) ; Result r = aggTable . get ( g ) ; Cell existingQueuesCell = r . getColumnLatestCell ( AggregationConstants . INFO_FAM_BYTES , AggregationConstants . HRAVEN_QUEUE_BYTES ) ; String existingQueues = null ; byte [ ] existingQueuesBytes = null ; if ( existingQueuesCell != null ) { existingQueues = Bytes . toString ( CellUtil . cloneValue ( existingQueuesCell ) ) ; existingQueuesBytes = Bytes . toBytes ( existingQueues ) ; } // get details for the queue list to be inserted String insertQueues = createQueueListValue ( jobDetails , existingQueues ) ; // if existing and to be inserted queue lists are different, then // execute check and put if ( insertQueues . equalsIgnoreCase ( existingQueues ) ) { if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "Queue already present in aggregation for this app " + existingQueues + " " + insertQueues ) ; } return true ; } else { return executeCheckAndPut ( aggTable , rowKey , existingQueuesBytes , Bytes . toBytes ( insertQueues ) , AggregationConstants . INFO_FAM_BYTES , AggregationConstants . HRAVEN_QUEUE_BYTES ) ; } }
updates the queue list for this app aggregation