@@ -0,0 +1,2456 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one%0A * or more contributor license agreements.  See the NOTICE file%0A * distributed with this work for additional information%0A * regarding copyright ownership.  The ASF licenses this file%0A * to you under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance%0A * with the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.apache.hadoop.util;%0A%0Aimport java.util.concurrent.atomic.AtomicLong;%0A%0Aimport org.apache.hadoop.classification.InterfaceAudience;%0A%0A/**%0A * Sequential number generator.%0A * %0A * This class is thread safe.%0A */%0A@InterfaceAudience.Private%0Apublic abstract class SequentialNumber %7B%0A  private final AtomicLong currentValue;%0A%0A  /** Create a new instance with the given initial value. */%0A  protected SequentialNumber(final long initialValue) %7B%0A    currentValue = new AtomicLong(initialValue);%0A  %7D%0A%0A  /** @return the current value. */%0A  public long getCurrentValue() %7B%0A    return currentValue.get();%0A  %7D%0A%0A  /** Set current value. */%0A  public void setCurrentValue(long value) %7B%0A    currentValue.set(value);%0A  %7D%0A%0A  /** Increment and then return the next value. */%0A  public long nextValue() %7B%0A    return currentValue.incrementAndGet();%0A  %7D%0A%0A  /** Skip to the new value. */%0A  public void skipTo(long newValue) throws IllegalStateException %7B%0A    for(;;) %7B%0A      final long c = getCurrentValue();%0A      if (newValue %3C c) %7B%0A        throw new IllegalStateException(%0A            %22Cannot skip to less than the current value (=%22%0A            + c + %22), where newValue=%22 + newValue);%0A      %7D%0A%0A      if (currentValue.compareAndSet(c, newValue)) %7B%0A        return;%0A      %7D%0A    %7D%0A  %7D%0A%0A  @Override%0A  public boolean equals(final Object that) %7B%0A    if (that == null %7C%7C this.getClass() != that.getClass()) %7B%0A      return false;%0A    %7D%0A    final AtomicLong thatValue = ((SequentialNumber)that).currentValue;%0A    return currentValue.equals(thatValue);%0A  %7D%0A%0A  @Override%0A  public int hashCode() %7B%0A    final long v = currentValue.get();%0A    return (int)v %5E (int)(v %3E%3E%3E 32);%0A  %7D%0A%7D%0A

Add file which was accidentally missed during commit of HDFS-4346.