kafka-813; (add the missing file) Minor cleanup in Controller; patched by Swapnil Ghike; reviewed by Neha Narkhede and Jun Rao
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/df221297 Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/df221297 Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/df221297 Branch: refs/heads/trunk Commit: df221297c715f2a9dbe389f727a840ea1ab27e47 Parents: 28ee785 Author: Swapnil Ghike <[email protected]> Authored: Mon Mar 25 10:45:44 2013 -0700 Committer: Jun Rao <[email protected]> Committed: Mon Mar 25 10:45:44 2013 -0700 ---------------------------------------------------------------------- .../kafka/common/NoReplicaOnlineException.scala | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kafka/blob/df221297/core/src/main/scala/kafka/common/NoReplicaOnlineException.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/kafka/common/NoReplicaOnlineException.scala b/core/src/main/scala/kafka/common/NoReplicaOnlineException.scala new file mode 100644 index 0000000..a1e1279 --- /dev/null +++ b/core/src/main/scala/kafka/common/NoReplicaOnlineException.scala @@ -0,0 +1,28 @@ +/** + * 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 kafka.common + + +/** + * This exception is thrown by the leader elector in the controller when leader election fails for a partition since + * all the replicas for a partition are offline + */ +class NoReplicaOnlineException(message: String, cause: Throwable) extends RuntimeException(message, cause) { + def this(message: String) = this(message, null) + def this() = this(null, null) +} \ No newline at end of file
