You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ec...@apache.org on 2013/02/25 23:50:29 UTC
svn commit: r1449950 [15/35] - in /hbase/trunk: ./ hbase-client/
hbase-client/src/ hbase-client/src/main/ hbase-client/src/main/java/
hbase-client/src/main/java/org/ hbase-client/src/main/java/org/apache/
hbase-client/src/main/java/org/apache/hadoop/ h...
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CallerDisconnectedException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CallerDisconnectedException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CallerDisconnectedException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CallerDisconnectedException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,32 @@
+/**
+ * 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.exceptions;
+
+import java.io.IOException;
+
+/**
+ * Exception indicating that the remote host making this IPC lost its
+ * IPC connection. This will never be returned back to a client,
+ * but is only used for logging on the server side, etc.
+ */
+public class CallerDisconnectedException extends IOException {
+ private static final long serialVersionUID = 1L;
+ public CallerDisconnectedException(String msg) {
+ super(msg);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClockOutOfSyncException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClockOutOfSyncException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClockOutOfSyncException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClockOutOfSyncException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,37 @@
+/**
+ *
+ * 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.exceptions;
+
+import java.io.IOException;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * This exception is thrown by the master when a region server clock skew is
+ * too high.
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class ClockOutOfSyncException extends IOException {
+ public ClockOutOfSyncException(String message) {
+ super(message);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ConstraintException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ConstraintException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ConstraintException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ConstraintException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,47 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.client.Put;
+
+/**
+ * Exception that a user defined constraint throws on failure of a {@link Put}.
+ * <p>
+ * Does <b>NOT</b> attempt the {@link Put} multiple times, since the constraint
+ * <it>should</it> fail every time for the same {@link Put} (it should be
+ * idempotent).
+ */
+@InterfaceAudience.Private
+public class ConstraintException extends org.apache.hadoop.hbase.exceptions.DoNotRetryIOException {
+ private static final long serialVersionUID = 1197446454511704140L;
+
+ public ConstraintException() {
+ super();
+ }
+
+ public ConstraintException(String msg)
+ {
+ super(msg);
+ }
+
+
+ public ConstraintException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CoprocessorException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CoprocessorException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CoprocessorException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CoprocessorException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,55 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.exceptions.DoNotRetryIOException;
+
+/**
+ * Thrown if a coprocessor encounters any exception.
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class CoprocessorException extends DoNotRetryIOException {
+ private static final long serialVersionUID = 4357922136679804887L;
+
+ /** Default Constructor */
+ public CoprocessorException() {
+ super();
+ }
+
+ /**
+ * Constructor with a Class object and exception message.
+ * @param clazz
+ * @param s
+ */
+ public CoprocessorException(Class<?> clazz, String s) {
+ super( "Coprocessor [" + clazz.getName() + "]: " + s);
+ }
+
+ /**
+ * Constructs the exception and supplies a string as the message
+ * @param s - message
+ */
+ public CoprocessorException(String s) {
+ super(s);
+ }
+
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CorruptHFileException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CorruptHFileException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CorruptHFileException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CorruptHFileException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,38 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.exceptions.DoNotRetryIOException;
+
+/**
+ * This exception is thrown when attempts to read an HFile fail due to corruption or truncation
+ * issues.
+ */
+@InterfaceAudience.Private
+public class CorruptHFileException extends DoNotRetryIOException {
+ private static final long serialVersionUID = 1L;
+
+ public CorruptHFileException(String m, Throwable t) {
+ super(m, t);
+ }
+
+ public CorruptHFileException(String m) {
+ super(m);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CorruptedSnapshotException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CorruptedSnapshotException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CorruptedSnapshotException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/CorruptedSnapshotException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,56 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
+
+
+/**
+ * Exception thrown when the found snapshot info from the filesystem is not valid
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class CorruptedSnapshotException extends HBaseSnapshotException {
+
+ /**
+ * @param message message describing the exception
+ * @param e cause
+ */
+ public CorruptedSnapshotException(String message, Exception e) {
+ super(message, e);
+ }
+
+ /**
+ * Snapshot was corrupt for some reason
+ * @param message full description of the failure
+ * @param snapshot snapshot that was expected
+ */
+ public CorruptedSnapshotException(String message, SnapshotDescription snapshot) {
+ super(message, snapshot);
+ }
+
+ /**
+ * @param message message describing the exception
+ */
+ public CorruptedSnapshotException(String message) {
+ super(message, (SnapshotDescription)null);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DeserializationException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DeserializationException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DeserializationException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DeserializationException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,43 @@
+/**
+ * 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.exceptions;
+
+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);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DoNotRetryIOException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DoNotRetryIOException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DoNotRetryIOException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DoNotRetryIOException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,59 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * Subclass if exception is not meant to be retried: e.g.
+ * {@link org.apache.hadoop.hbase.exceptions.UnknownScannerException}
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class DoNotRetryIOException extends HBaseIOException {
+
+ private static final long serialVersionUID = 1197446454511704139L;
+
+ /**
+ * default constructor
+ */
+ public DoNotRetryIOException() {
+ super();
+ }
+
+ /**
+ * @param message
+ */
+ public DoNotRetryIOException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public DoNotRetryIOException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public DoNotRetryIOException(Throwable cause) {
+ super(cause);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DroppedSnapshotException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DroppedSnapshotException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DroppedSnapshotException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/DroppedSnapshotException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,46 @@
+/**
+ *
+ * Licensed 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+import java.io.IOException;
+
+
+/**
+ * Thrown during flush if the possibility snapshot content was not properly
+ * persisted into store files. Response should include replay of hlog content.
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class DroppedSnapshotException extends IOException {
+
+ private static final long serialVersionUID = -5463156580831677374L;
+
+ /**
+ * @param msg
+ */
+ public DroppedSnapshotException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * default constructor
+ */
+ public DroppedSnapshotException() {
+ super();
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ExportSnapshotException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ExportSnapshotException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ExportSnapshotException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ExportSnapshotException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,43 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+/**
+ * Thrown when a snapshot could not be exported due to an error during the operation.
+ */
+@InterfaceAudience.Public
+@SuppressWarnings("serial")
+public class ExportSnapshotException extends HBaseSnapshotException {
+
+ /**
+ * @param msg message describing the exception
+ */
+ public ExportSnapshotException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * @param message message describing the exception
+ * @param e cause
+ */
+ public ExportSnapshotException(String message, Exception e) {
+ super(message, e);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FailedLogCloseException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FailedLogCloseException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FailedLogCloseException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FailedLogCloseException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,46 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+import java.io.IOException;
+
+/**
+ * Thrown when we fail close of the write-ahead-log file.
+ * Package private. Only used inside this package.
+ */
+@InterfaceAudience.Private
+public class FailedLogCloseException extends IOException {
+ private static final long serialVersionUID = 1759152841462990925L;
+
+ /**
+ *
+ */
+ public FailedLogCloseException() {
+ super();
+ }
+
+ /**
+ * @param arg0
+ */
+ public FailedLogCloseException(String arg0) {
+ super(arg0);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FailedSanityCheckException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FailedSanityCheckException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FailedSanityCheckException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FailedSanityCheckException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,49 @@
+/**
+ * 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.exceptions;
+
+/**
+ * Exception thrown if a mutation fails sanity checks.
+ */
+public class FailedSanityCheckException extends org.apache.hadoop.hbase.exceptions.DoNotRetryIOException {
+
+ private static final long serialVersionUID = 1788783640409186240L;
+
+ /**
+ * default constructor
+ */
+ public FailedSanityCheckException() {
+ super();
+ }
+
+ /**
+ * @param message
+ */
+ public FailedSanityCheckException(String message) {
+ super(message);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public FailedSanityCheckException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FileSystemVersionException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FileSystemVersionException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FileSystemVersionException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/FileSystemVersionException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,43 @@
+/**
+ *
+ * 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.exceptions;
+
+import java.io.IOException;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/** Thrown when the file system needs to be upgraded */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class FileSystemVersionException extends IOException {
+ private static final long serialVersionUID = 1004053363L;
+
+ /** default constructor */
+ public FileSystemVersionException() {
+ super();
+ }
+
+ /** @param s message */
+ public FileSystemVersionException(String s) {
+ super(s);
+ }
+
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,44 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+/**
+ * Base checked exception in HBase.
+ * @see <a href="https://issues.apache.org/jira/browse/HBASE-5796">HBASE-5796</a>
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Private
+public class HBaseException extends Exception {
+ public HBaseException() {
+ super();
+ }
+
+ public HBaseException(final String message) {
+ super(message);
+ }
+
+ public HBaseException(final String message, final Throwable t) {
+ super(message, t);
+ }
+
+ public HBaseException(final Throwable t) {
+ super(t);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseIOException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseIOException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseIOException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseIOException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,48 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+import java.io.IOException;
+
+/**
+ * All hbase specific IOExceptions should be subclasses of HBaseIOException
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class HBaseIOException extends IOException {
+
+ private static final long serialVersionUID = 1L;
+
+ public HBaseIOException() {
+ super();
+ }
+
+ public HBaseIOException(String message) {
+ super(message);
+ }
+
+ public HBaseIOException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public HBaseIOException(Throwable cause) {
+ super(cause);
+ }}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseSnapshotException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseSnapshotException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseSnapshotException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/HBaseSnapshotException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,76 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
+
+/**
+ * General exception base class for when a snapshot fails
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class HBaseSnapshotException extends HBaseIOException {
+
+ private SnapshotDescription description;
+
+ /**
+ * Some exception happened for a snapshot and don't even know the snapshot that it was about
+ * @param msg Full description of the failure
+ */
+ public HBaseSnapshotException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Exception for the given snapshot that has no previous root cause
+ * @param msg reason why the snapshot failed
+ * @param desc description of the snapshot that is being failed
+ */
+ public HBaseSnapshotException(String msg, SnapshotDescription desc) {
+ super(msg);
+ this.description = desc;
+ }
+
+ /**
+ * Exception for the given snapshot due to another exception
+ * @param msg reason why the snapshot failed
+ * @param cause root cause of the failure
+ * @param desc description of the snapshot that is being failed
+ */
+ public HBaseSnapshotException(String msg, Throwable cause, SnapshotDescription desc) {
+ super(msg, cause);
+ this.description = desc;
+ }
+
+ /**
+ * Exception when the description of the snapshot cannot be determined, due to some root other
+ * root cause
+ * @param message description of what caused the failure
+ * @param e root cause
+ */
+ public HBaseSnapshotException(String message, Exception e) {
+ super(message, e);
+ }
+
+ public SnapshotDescription getSnapshotDescription() {
+ return this.description;
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/InvalidFamilyOperationException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/InvalidFamilyOperationException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/InvalidFamilyOperationException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/InvalidFamilyOperationException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,54 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+import java.io.IOException;
+
+/**
+ * Thrown if a request is table schema modification is requested but
+ * made for an invalid family name.
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class InvalidFamilyOperationException extends IOException {
+ private static final long serialVersionUID = 1L << 22 - 1L;
+ /** default constructor */
+ public InvalidFamilyOperationException() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param s message
+ */
+ public InvalidFamilyOperationException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructor taking another exception.
+ * @param e Exception to grab data from.
+ */
+ public InvalidFamilyOperationException(Exception e) {
+ super(e);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/InvalidHFileException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/InvalidHFileException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/InvalidHFileException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/InvalidHFileException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,43 @@
+/**
+ * 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.exceptions;
+
+import java.io.IOException;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+/**
+ * Thrown when an invalid HFile format is detected
+ */
+@InterfaceAudience.Private
+public class InvalidHFileException extends IOException {
+ private static final long serialVersionUID = 4660352028739861249L;
+
+ /** constructor */
+ public InvalidHFileException() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param s message
+ */
+ public InvalidHFileException(String s) {
+ super(s);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/LeaseException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/LeaseException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/LeaseException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/LeaseException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,43 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.exceptions.DoNotRetryIOException;
+
+/**
+ * Reports a problem with a lease
+ */
+@InterfaceAudience.Private
+public class LeaseException extends DoNotRetryIOException {
+
+ private static final long serialVersionUID = 8179703995292418650L;
+
+ /** default constructor */
+ public LeaseException() {
+ super();
+ }
+
+ /**
+ * @param message
+ */
+ public LeaseException(String message) {
+ super(message);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/LockTimeoutException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/LockTimeoutException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/LockTimeoutException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/LockTimeoutException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,37 @@
+/*
+ * Copyright The Apache Software Foundation
+ *
+ * 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.exceptions;
+
+import java.io.IOException;
+
+public class LockTimeoutException extends IOException {
+
+ private static final long serialVersionUID = -1770764924258999825L;
+
+ /** Default constructor */
+ public LockTimeoutException() {
+ super();
+ }
+
+ public LockTimeoutException(String s) {
+ super(s);
+ }
+
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/MasterNotRunningException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/MasterNotRunningException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/MasterNotRunningException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/MasterNotRunningException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,57 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+import java.io.IOException;
+
+/**
+ * Thrown if the master is not running
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class MasterNotRunningException extends IOException {
+ private static final long serialVersionUID = 1L << 23 - 1L;
+ /** default constructor */
+ public MasterNotRunningException() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param s message
+ */
+ public MasterNotRunningException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructor taking another exception.
+ * @param e Exception to grab data from.
+ */
+ public MasterNotRunningException(Exception e) {
+ super(e);
+ }
+
+ public MasterNotRunningException(String s, Exception e) {
+ super(s, e);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NoSuchColumnFamilyException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NoSuchColumnFamilyException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NoSuchColumnFamilyException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NoSuchColumnFamilyException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,41 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+/**
+ * Thrown if request for nonexistent column family.
+ */
+@InterfaceAudience.Private
+public class NoSuchColumnFamilyException extends DoNotRetryIOException {
+ private static final long serialVersionUID = -6569952730832331274L;
+
+ /** default constructor */
+ public NoSuchColumnFamilyException() {
+ super();
+ }
+
+ /**
+ * @param message exception message
+ */
+ public NoSuchColumnFamilyException(String message) {
+ super(message);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NotAllMetaRegionsOnlineException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NotAllMetaRegionsOnlineException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NotAllMetaRegionsOnlineException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NotAllMetaRegionsOnlineException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,45 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * Thrown when an operation requires the root and all meta regions to be online
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class NotAllMetaRegionsOnlineException extends DoNotRetryIOException {
+ private static final long serialVersionUID = 6439786157874827523L;
+ /**
+ * default constructor
+ */
+ public NotAllMetaRegionsOnlineException() {
+ super();
+ }
+
+ /**
+ * @param message
+ */
+ public NotAllMetaRegionsOnlineException(String message) {
+ super(message);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NotServingRegionException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NotServingRegionException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NotServingRegionException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/NotServingRegionException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,56 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.util.Bytes;
+
+import java.io.IOException;
+
+/**
+ * Thrown by a region server if it is sent a request for a region it is not
+ * serving.
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class NotServingRegionException extends IOException {
+ private static final long serialVersionUID = 1L << 17 - 1L;
+
+ /** default constructor */
+ public NotServingRegionException() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param s message
+ */
+ public NotServingRegionException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructor
+ * @param s message
+ */
+ public NotServingRegionException(final byte [] s) {
+ super(Bytes.toString(s));
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/OrphanHLogAfterSplitException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/OrphanHLogAfterSplitException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/OrphanHLogAfterSplitException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/OrphanHLogAfterSplitException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,42 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+import java.io.IOException;
+
+@InterfaceAudience.Private
+public class OrphanHLogAfterSplitException extends IOException {
+
+ /**
+ * Create this exception without a message
+ */
+ public OrphanHLogAfterSplitException() {
+ super();
+ }
+
+ /**
+ * Create this exception with a message
+ * @param message why it failed
+ */
+ public OrphanHLogAfterSplitException(String message) {
+ super(message);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/OutOfOrderScannerNextException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/OutOfOrderScannerNextException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/OutOfOrderScannerNextException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/OutOfOrderScannerNextException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,38 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+/**
+ * Thrown by a RegionServer while doing next() calls on a ResultScanner. Both client and server
+ * maintain a nextCallSeq and if they do not match, RS will throw this exception.
+ */
+@InterfaceAudience.Private
+public class OutOfOrderScannerNextException extends DoNotRetryIOException {
+
+ private static final long serialVersionUID = 4595751007554273567L;
+
+ public OutOfOrderScannerNextException() {
+ super();
+ }
+
+ public OutOfOrderScannerNextException(String msg) {
+ super(msg);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/PleaseHoldException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/PleaseHoldException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/PleaseHoldException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/PleaseHoldException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,45 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * This exception is thrown by the master when a region server was shut down and
+ * restarted so fast that the master still hasn't processed the server shutdown
+ * of the first instance, or when master is initializing and client call admin
+ * operations, or when an operation is performed on a region server that is still starting.
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class PleaseHoldException extends HBaseIOException {
+ public PleaseHoldException(String message) {
+ super(message);
+ }
+
+ public PleaseHoldException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public PleaseHoldException(Throwable cause) {
+ super(cause);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionAlreadyInTransitionException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionAlreadyInTransitionException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionAlreadyInTransitionException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionAlreadyInTransitionException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,39 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+import java.io.IOException;
+
+/**
+ * This exception is thrown when a region server is asked to open or close
+ * a region but it's already processing it
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class RegionAlreadyInTransitionException extends IOException {
+
+ public RegionAlreadyInTransitionException(String s) {
+ super(s);
+ }
+
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,47 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+import java.io.IOException;
+/**
+ * Thrown when something happens related to region handling.
+ * Subclasses have to be more specific.
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class RegionException extends IOException {
+ private static final long serialVersionUID = 1473510258071111371L;
+
+ /** default constructor */
+ public RegionException() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param s message
+ */
+ public RegionException(String s) {
+ super(s);
+ }
+
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionMovedException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionMovedException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionMovedException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionMovedException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,154 @@
+/**
+ * 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.exceptions;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.ServerName;
+import org.apache.hadoop.ipc.RemoteException;
+
+/**
+ * Subclass if the server knows the region is now on another server.
+ * This allows the client to call the new region server without calling the master.
+ */
+@InterfaceAudience.Private
+@InterfaceStability.Evolving
+public class RegionMovedException extends NotServingRegionException {
+ private static final Log LOG = LogFactory.getLog(RegionMovedException.class);
+ private static final long serialVersionUID = -7232903522310558396L;
+
+ private final String hostname;
+ private final int port;
+ private final long startCode;
+ private final long locationSeqNum;
+
+ private static final String HOST_FIELD = "hostname=";
+ private static final String PORT_FIELD = "port=";
+ private static final String STARTCODE_FIELD = "startCode=";
+ private static final String LOCATIONSEQNUM_FIELD = "locationSeqNum=";
+
+
+ public RegionMovedException(ServerName serverName, long locationSeqNum) {
+ this.hostname = serverName.getHostname();
+ this.port = serverName.getPort();
+ this.startCode = serverName.getStartcode();
+ this.locationSeqNum = locationSeqNum;
+ }
+
+ public String getHostname() {
+ return hostname;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public ServerName getServerName(){
+ return new ServerName(hostname, port, startCode);
+ }
+
+ public long getLocationSeqNum() {
+ return locationSeqNum;
+ }
+
+ /**
+ * For hadoop.ipc internal call. Do NOT use.
+ * We have to parse the hostname to recreate the exception.
+ * The input is the one generated by {@link #getMessage()}
+ */
+ public RegionMovedException(String s) {
+ int posHostname = s.indexOf(HOST_FIELD) + HOST_FIELD.length();
+ int posPort = s.indexOf(PORT_FIELD) + PORT_FIELD.length();
+ int posStartCode = s.indexOf(STARTCODE_FIELD) + STARTCODE_FIELD.length();
+ int posSeqNum = s.indexOf(LOCATIONSEQNUM_FIELD) + LOCATIONSEQNUM_FIELD.length();
+
+ String tmpHostname = null;
+ int tmpPort = -1;
+ long tmpStartCode = -1;
+ long tmpSeqNum = HConstants.NO_SEQNUM;
+ try {
+ // TODO: this whole thing is extremely brittle.
+ tmpHostname = s.substring(posHostname, s.indexOf(' ', posHostname));
+ tmpPort = Integer.parseInt(s.substring(posPort, s.indexOf(' ', posPort)));
+ tmpStartCode = Long.parseLong(s.substring(posStartCode, s.indexOf('.', posStartCode)));
+ tmpSeqNum = Long.parseLong(s.substring(posSeqNum, s.indexOf('.', posSeqNum)));
+ } catch (Exception ignored) {
+ LOG.warn("Can't parse the hostname, port and startCode from this string: " +
+ s + ", continuing");
+ }
+
+ hostname = tmpHostname;
+ port = tmpPort;
+ startCode = tmpStartCode;
+ locationSeqNum = tmpSeqNum;
+ }
+
+ @Override
+ public String getMessage() {
+ // TODO: deserialization above depends on this. That is bad, but also means this
+ // should be modified carefully.
+ return "Region moved to: " + HOST_FIELD + hostname + " " + PORT_FIELD + port + " " +
+ STARTCODE_FIELD + startCode + ". As of " + LOCATIONSEQNUM_FIELD + locationSeqNum + ".";
+ }
+
+ /**
+ * Look for a RegionMovedException in the exception:
+ * - hadoop.ipc wrapped exceptions
+ * - nested exceptions
+ * Returns null if we didn't find the exception or if it was not readable.
+ */
+ public static RegionMovedException find(Object exception) {
+ if (exception == null || !(exception instanceof Throwable)){
+ return null;
+ }
+
+ Throwable cur = (Throwable)exception;
+ RegionMovedException res = null;
+
+ while (res == null && cur != null) {
+ if (cur instanceof RegionMovedException) {
+ res = (RegionMovedException) cur;
+ } else {
+ if (cur instanceof RemoteException) {
+ RemoteException re = (RemoteException) cur;
+ Exception e = re.unwrapRemoteException(RegionMovedException.class);
+ if (e == null){
+ e = re.unwrapRemoteException();
+ }
+ // unwrapRemoteException can return the exception given as a parameter when it cannot
+ // unwrap it. In this case, there is no need to look further
+ // noinspection ObjectEquality
+ if (e != re){
+ res = find(e);
+ }
+ }
+ cur = cur.getCause();
+ }
+ }
+
+ if (res != null && (res.getPort() < 0 || res.getHostname() == null)){
+ // We failed to parse the exception. Let's act as we don't find the exception.
+ return null;
+ } else {
+ return res;
+ }
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionServerRunningException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionServerRunningException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionServerRunningException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionServerRunningException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,46 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+import java.io.IOException;
+
+/**
+ * Thrown if the region server log directory exists (which indicates another
+ * region server is running at the same address)
+ */
+@InterfaceAudience.Private
+public class RegionServerRunningException extends IOException {
+ private static final long serialVersionUID = 1L << 31 - 1L;
+
+ /** Default Constructor */
+ public RegionServerRunningException() {
+ super();
+ }
+
+ /**
+ * Constructs the exception and supplies a string as the message
+ * @param s - message
+ */
+ public RegionServerRunningException(String s) {
+ super(s);
+ }
+
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionServerStoppedException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionServerStoppedException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionServerStoppedException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionServerStoppedException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,35 @@
+/**
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+import java.io.IOException;
+
+/**
+ * Thrown by the region server when it is in shutting down state.
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Private
+public class RegionServerStoppedException extends IOException {
+
+ public RegionServerStoppedException(String s) {
+ super(s);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionTooBusyException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionTooBusyException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionTooBusyException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RegionTooBusyException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,47 @@
+/**
+ * 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.exceptions;
+
+import java.io.IOException;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * Thrown by a region server if it will block and wait to serve a request.
+ * For example, the client wants to insert something to a region while the
+ * region is compacting.
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class RegionTooBusyException extends IOException {
+ private static final long serialVersionUID = 1728345723728342L;
+
+ /** default constructor */
+ public RegionTooBusyException() {
+ super();
+ }
+
+ /**
+ * Constructor
+ * @param msg message
+ */
+ public RegionTooBusyException(final String msg) {
+ super(msg);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RestoreSnapshotException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RestoreSnapshotException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RestoreSnapshotException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/RestoreSnapshotException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,43 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
+
+/**
+ * Thrown when a snapshot could not be restored due to a server-side error when restoring it.
+ */
+@SuppressWarnings("serial")
+public class RestoreSnapshotException extends HBaseSnapshotException {
+ public RestoreSnapshotException(String msg, SnapshotDescription desc) {
+ super(msg, desc);
+ }
+
+ public RestoreSnapshotException(String msg, Throwable cause, SnapshotDescription desc) {
+ super(msg, cause, desc);
+ }
+
+ public RestoreSnapshotException(String msg) {
+ super(msg);
+ }
+
+ public RestoreSnapshotException(String message, Exception e) {
+ super(message, e);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ServerNotRunningYetException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ServerNotRunningYetException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ServerNotRunningYetException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ServerNotRunningYetException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,32 @@
+/*
+ *
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+
+import java.io.IOException;
+
+@SuppressWarnings("serial")
+@InterfaceAudience.Private
+public class ServerNotRunningYetException extends IOException {
+ public ServerNotRunningYetException(String s) {
+ super(s);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotCreationException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotCreationException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotCreationException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotCreationException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,54 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
+
+/**
+ * Thrown when a snapshot could not be created due to a server-side error when taking the snapshot.
+ */
+@SuppressWarnings("serial")
+public class SnapshotCreationException extends HBaseSnapshotException {
+
+ /**
+ * Used internally by the RPC engine to pass the exception back to the client.
+ * @param msg error message to pass back
+ */
+ public SnapshotCreationException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * Failure to create the specified snapshot
+ * @param msg reason why the snapshot couldn't be completed
+ * @param desc description of the snapshot attempted
+ */
+ public SnapshotCreationException(String msg, SnapshotDescription desc) {
+ super(msg, desc);
+ }
+
+ /**
+ * Failure to create the specified snapshot due to an external cause
+ * @param msg reason why the snapshot couldn't be completed
+ * @param cause root cause of the failure
+ * @param desc description of the snapshot attempted
+ */
+ public SnapshotCreationException(String msg, Throwable cause, SnapshotDescription desc) {
+ super(msg, cause, desc);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotDoesNotExistException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotDoesNotExistException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotDoesNotExistException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotDoesNotExistException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,45 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
+
+
+/**
+ * Thrown when the server is looking for a snapshot but can't find the snapshot on the filesystem
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class SnapshotDoesNotExistException extends HBaseSnapshotException {
+ /**
+ * @param msg full description of the failure
+ */
+ public SnapshotDoesNotExistException(String msg) {
+ super(msg);
+ }
+
+ /**
+ * @param desc expected snapshot to find
+ */
+ public SnapshotDoesNotExistException(SnapshotDescription desc) {
+ super("Snapshot '" + desc.getName() +"' doesn't exist on the filesystem", desc);
+ }
+}
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotExistsException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotExistsException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotExistsException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/SnapshotExistsException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,40 @@
+/**
+ * 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
+
+/**
+ * Thrown when a snapshot exists but should not
+ */
+@SuppressWarnings("serial")
+@InterfaceAudience.Public
+@InterfaceStability.Evolving
+public class SnapshotExistsException extends HBaseSnapshotException {
+
+ /**
+ * Failure due to the snapshot already existing
+ * @param msg full description of the failure
+ * @param desc snapshot that was attempted
+ */
+ public SnapshotExistsException(String msg, SnapshotDescription desc) {
+ super(msg, desc);
+ }
+}
\ No newline at end of file
Added: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/TableExistsException.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/TableExistsException.java?rev=1449950&view=auto
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/TableExistsException.java (added)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/TableExistsException.java Mon Feb 25 22:50:17 2013
@@ -0,0 +1,42 @@
+/**
+ *
+ * Licensed 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.exceptions;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+import java.io.IOException;
+
+/**
+ * Thrown when a table exists but should not
+ */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
+public class TableExistsException extends IOException {
+ private static final long serialVersionUID = 1L << 7 - 1L;
+ /** default constructor */
+ public TableExistsException() {
+ super();
+ }
+
+ /**
+ * Constructor
+ *
+ * @param s message
+ */
+ public TableExistsException(String s) {
+ super(s);
+ }
+}