@Override public boolean isEmpty() { return delegate.isEmpty(); }
@Override public boolean isNone() { return lowIndexedRanges.isEmpty(); }
@Override public boolean isNone() { return lowIndexedRanges.isEmpty(); }
public boolean isEmpty() { return buckets.isEmpty(); }
/** * Method to check if the familyMap is empty * @return true if empty, false otherwise */ public boolean isEmpty() { return familyMap.isEmpty(); }
/** * Method for checking if any families have been inserted into this Increment * @return true if familyMap is non empty false otherwise */ public boolean hasFamilies() { return !this.familyMap.isEmpty(); }
boolean isActive() { return inProgressPart != null || !pendingPartsForCurrentCheckpoint.isEmpty() || !pendingPartsPerCheckpoint.isEmpty(); }
public boolean isEmpty() { try { lock.readLock().lock(); return completePartitionsTimeline.isEmpty(); } finally { lock.readLock().unlock(); } }
@Override public void putCoalescing(Range<K> range, V value) { if (entriesByLowerBound.isEmpty()) { put(range, value); return; } Range<K> coalescedRange = coalescedRange(range, checkNotNull(value)); put(coalescedRange, value); }
@Override public boolean isEmpty() { return upperBoundWindow.equals(Range.all()) ? rangesByLowerBound.isEmpty() : !entryIterator().hasNext(); } }
public Range getSpan() { if (lowIndexedRanges.isEmpty()) { throw new IllegalStateException("Can not get span if no ranges exist"); } return lowIndexedRanges.firstEntry().getValue().span(lowIndexedRanges.lastEntry().getValue()); }
public Range getSpan() { if (lowIndexedRanges.isEmpty()) { throw new IllegalStateException("Can not get span if no ranges exist"); } return lowIndexedRanges.firstEntry().getValue().span(lowIndexedRanges.lastEntry().getValue()); }
@Override public boolean isEmpty() { return upperBoundWindow.equals(Range.all()) ? rangesByLowerBound.isEmpty() : !entryIterator().hasNext(); } }
@Override public void putCoalescing(Range<K> range, V value) { if (entriesByLowerBound.isEmpty()) { put(range, value); return; } Range<K> coalescedRange = coalescedRange(range, checkNotNull(value)); put(coalescedRange, value); }
@Override public boolean isEmpty() { return upperBoundWindow.equals(Range.all()) ? rangesByLowerBound.isEmpty() : !entryIterator().hasNext(); } }
void merge(final Bucket<IN, BucketID> bucket) throws IOException { checkNotNull(bucket); checkState(Objects.equals(bucket.bucketPath, bucketPath)); // There should be no pending files in the "to-merge" states. // The reason is that: // 1) the pendingPartsForCurrentCheckpoint is emptied whenever we take a snapshot (see prepareBucketForCheckpointing()). // So a snapshot, including the one we are recovering from, will never contain such files. // 2) the files in pendingPartsPerCheckpoint are committed upon recovery (see commitRecoveredPendingFiles()). checkState(bucket.pendingPartsForCurrentCheckpoint.isEmpty()); checkState(bucket.pendingPartsPerCheckpoint.isEmpty()); CommitRecoverable committable = bucket.closePartFile(); if (committable != null) { pendingPartsForCurrentCheckpoint.add(committable); } if (LOG.isDebugEnabled()) { LOG.debug("Subtask {} merging buckets for bucket id={}", subtaskIndex, bucketId); } }
@MapFeature.Require(SUPPORTS_REMOVE) @CollectionSize.Require(ONE) public void testSingletonMapPollFirst() { assertEquals(a, navigableMap.pollFirstEntry()); assertTrue(navigableMap.isEmpty()); }
@MapFeature.Require(SUPPORTS_REMOVE) @CollectionSize.Require(ONE) public void testSingletonMapPollLast() { assertEquals(a, navigableMap.pollLastEntry()); assertTrue(navigableMap.isEmpty()); }
@Override public void putCoalescing(Range<K> range, V value) { if (entriesByLowerBound.isEmpty()) { put(range, value); return; } Range<K> coalescedRange = coalescedRange(range, checkNotNull(value)); put(coalescedRange, value); }
@GwtIncompatible // NavigableMap public void testAsMapNavigableEmpty() { NavigableSet<String> strings = ImmutableSortedSet.of(); NavigableMap<String, Integer> map = Maps.asMap(strings, LENGTH_FUNCTION); assertThat(map.entrySet()).isEmpty(); assertTrue(map.isEmpty()); assertNull(map.get("five")); }