@VisibleForTesting
  void partitionFirstSharedQueueItemIfNeeded() {
    final TableRuntimeContext headPartition = getOwnedTablesQueue().peek();
    if (headPartition != null) {
      synchronized (partitionStateLock) {
        keepPartitioningIfNeeded(headPartition);
      }
    } else if (LOG.isTraceEnabled()) {
      LOG.trace("No item at head of shared partition queue");
    }
  }
@VisibleForTesting
  void partitionFirstSharedQueueItemIfNeeded() {
    final TableRuntimeContext headPartition = getOwnedTablesQueue().peek();
    if (headPartition != null) {
      synchronized (partitionStateLock) {
        keepPartitioningIfNeeded(headPartition);
      }
    } else if (LOG.isTraceEnabled()) {
      LOG.trace("No item at head of shared partition queue");
    }
  }
@ VisibleForTesting void partitionFirstSharedQueueItemIfNeeded ( ) { final TableRuntimeContext headPartition = getOwnedTablesQueue ( ) . peek ( ) ; if ( headPartition != null ) { synchronized ( partitionStateLock ) { keepPartitioningIfNeeded ( headPartition ) ; } } else if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "No item at head of shared partition queue" ) ; } }
<p>Examines the first item ("head") im the shared partition queue, and adds a new partition if appropriate</p>
<p>A new partition will be created if the number of partitions for the head item's table is still less
than the maximum, and that table itself is partitionable</p>
<p > Examines the first item ( head ) im the shared partition queue and adds a new partition if appropriate< / p > <p > A new partition will be created if the number of partitions for the head item s table is still less than the maximum and that table itself is partitionable< / p >