@@ -1,72 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.hadoop.hbase.regionserver.wal; - -import org.apache.hadoop.classification.InterfaceAudience; - -/** - * Dictionary interface - * - * Dictionary indexes should be either bytes or shorts, only positive. (The - * first bit is reserved for detecting whether something is compressed or not). - */ -@InterfaceAudience.Private -interface Dictionary { - byte NOT_IN_DICTIONARY = -1; - - void init(int initialSize); - /** - * Gets an entry from the dictionary. - * - * @param idx index of the entry - * @return the entry, or null if non existent - */ - byte[] getEntry(short idx); - - /** - * Finds the index of an entry. - * If no entry found, we add it. - * - * @param data the byte array that we're looking up - * @param offset Offset into <code>data</code> to add to Dictionary. - * @param length Length beyond <code>offset</code> that comprises entry; must be > 0. - * @return the index of the entry, or {@link #NOT_IN_DICTIONARY} if not found - */ - short findEntry(byte[] data, int offset, int length); - - /** - * Adds an entry to the dictionary. - * Be careful using this method. It will add an entry to the - * dictionary even if it already has an entry for the same data. - * Call {{@link #findEntry(byte[], int, int)}} to add without duplicating - * dictionary entries. - * - * @param data the entry to add - * @param offset Offset into <code>data</code> to add to Dictionary. - * @param length Length beyond <code>offset</code> that comprises entry; must be > 0. - * @return the index of the entry - */ - - short addEntry(byte[] data, int offset, int length); - - /** - * Flushes the dictionary, empties all values. - */ - void clear(); -}
@@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.hadoop.hbase; - -import java.lang.annotation.*; - -import org.apache.hadoop.classification.InterfaceAudience; - -/** - * A package attribute that captures the version of hbase that was compiled. - * Copied down from hadoop. All is same except name of interface. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.PACKAGE) -@InterfaceAudience.Private -public @interface VersionAnnotation { - - /** - * Get the Hadoop version - * @return the version string "0.6.3-dev" - */ - String version(); - - /** - * Get the username that compiled Hadoop. - */ - String user(); - - /** - * Get the date when Hadoop was compiled. - * @return the date in unix 'date' format - */ - String date(); - - /** - * Get the url for the subversion repository. - */ - String url(); - - /** - * Get the subversion revision. - * @return the revision number as a string (eg. "451451") - */ - String revision(); -}
@@ -1,41 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.hadoop.hbase.util; - -import org.apache.hadoop.classification.InterfaceAudience; - -/** - * Uses an incrementing algorithm instead of the default. - */ -@InterfaceAudience.Private -public class IncrementingEnvironmentEdge implements EnvironmentEdge { - - private long timeIncrement = 1; - - /** - * {@inheritDoc} - * <p/> - * This method increments a known value for the current time each time this - * method is called. The first value is 1. - */ - @Override - public synchronized long currentTimeMillis() { - return timeIncrement++; - } -}
@@ -1,45 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.hadoop.hbase; - -import org.apache.hadoop.classification.InterfaceAudience; - -/** - * Interface to support the aborting of a given server or client. - * <p> - * This is used primarily for ZooKeeper usage when we could get an unexpected - * and fatal exception, requiring an abort. - * <p> - * Implemented by the Master, RegionServer, and TableServers (client). - */ -@InterfaceAudience.Private -public interface Abortable { - /** - * Abort the server or client. - * @param why Why we're aborting. - * @param e Throwable that caused abort. Can be null. - */ - public void abort(String why, Throwable e); - - /** - * Check if the server or client was aborted. - * @return true if the server or client was aborted, false otherwise - */ - public boolean isAborted(); -}
@@ -1,43 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.hadoop.hbase; - -import org.apache.hadoop.classification.InterfaceAudience; - -/** - * Failed deserialization. - */ -@InterfaceAudience.Private -@SuppressWarnings("serial") -public class DeserializationException extends HBaseException { - public DeserializationException() { - super(); - } - - public DeserializationException(final String message) { - super(message); - } - - public DeserializationException(final String message, final Throwable t) { - super(message, t); - } - - public DeserializationException(final Throwable t) { - super(t); - } -}