Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C6C410ADD for ; Sat, 7 Sep 2013 03:29:05 +0000 (UTC) Received: (qmail 38879 invoked by uid 500); 7 Sep 2013 03:28:40 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 38462 invoked by uid 500); 7 Sep 2013 03:28:27 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 37673 invoked by uid 99); 7 Sep 2013 03:28:10 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Sep 2013 03:28:10 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D478E90316C; Sat, 7 Sep 2013 03:28:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ctubbsii@apache.org To: commits@accumulo.apache.org Date: Sat, 07 Sep 2013 03:28:52 -0000 Message-Id: <46349ae1722549489be126de4d1716e3@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [49/59] [abbrv] ACCUMULO-658 consistent package names to avoid overlapped sealed jars http://git-wip-us.apache.org/repos/asf/accumulo/blob/a10587ed/server/tserver/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java ---------------------------------------------------------------------- diff --git a/server/tserver/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java b/server/tserver/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java deleted file mode 100644 index 06c6395..0000000 --- a/server/tserver/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java +++ /dev/null @@ -1,111 +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.accumulo.server.tabletserver; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Map; - -import org.apache.accumulo.core.conf.AccumuloConfiguration; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.iterators.IteratorEnvironment; -import org.apache.accumulo.core.iterators.SortedKeyValueIterator; -import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; -import org.apache.accumulo.core.iterators.system.MultiIterator; -import org.apache.accumulo.core.metadata.schema.DataFileValue; -import org.apache.accumulo.server.fs.FileRef; -import org.apache.accumulo.server.tabletserver.FileManager.ScanFileManager; -import org.apache.hadoop.fs.Path; - -public class TabletIteratorEnvironment implements IteratorEnvironment { - - private final ScanFileManager trm; - private final IteratorScope scope; - private final boolean fullMajorCompaction; - private final AccumuloConfiguration config; - private final ArrayList> topLevelIterators = new ArrayList>(); - private Map files; - - TabletIteratorEnvironment(IteratorScope scope, AccumuloConfiguration config) { - if (scope == IteratorScope.majc) - throw new IllegalArgumentException("must set if compaction is full"); - - this.scope = scope; - this.trm = null; - this.config = config; - this.fullMajorCompaction = false; - } - - TabletIteratorEnvironment(IteratorScope scope, AccumuloConfiguration config, ScanFileManager trm, Map files) { - if (scope == IteratorScope.majc) - throw new IllegalArgumentException("must set if compaction is full"); - - this.scope = scope; - this.trm = trm; - this.config = config; - this.fullMajorCompaction = false; - this.files = files; - } - - TabletIteratorEnvironment(IteratorScope scope, boolean fullMajC, AccumuloConfiguration config) { - if (scope != IteratorScope.majc) - throw new IllegalArgumentException("Tried to set maj compaction type when scope was " + scope); - - this.scope = scope; - this.trm = null; - this.config = config; - this.fullMajorCompaction = fullMajC; - } - - @Override - public AccumuloConfiguration getConfig() { - return config; - } - - @Override - public IteratorScope getIteratorScope() { - return scope; - } - - @Override - public boolean isFullMajorCompaction() { - if (scope != IteratorScope.majc) - throw new IllegalStateException("Asked about major compaction type when scope is " + scope); - return fullMajorCompaction; - } - - @Override - public SortedKeyValueIterator reserveMapFileReader(String mapFileName) throws IOException { - FileRef ref = new FileRef(mapFileName, new Path(mapFileName)); - return trm.openFiles(Collections.singletonMap(ref, files.get(ref)), false).get(0); - } - - @Override - public void registerSideChannel(SortedKeyValueIterator iter) { - topLevelIterators.add(iter); - } - - SortedKeyValueIterator getTopLevelIterator(SortedKeyValueIterator iter) { - if (topLevelIterators.isEmpty()) - return iter; - ArrayList> allIters = new ArrayList>(topLevelIterators); - allIters.add(iter); - return new MultiIterator(allIters, false); - } -} http://git-wip-us.apache.org/repos/asf/accumulo/blob/a10587ed/server/tserver/src/main/java/org/apache/accumulo/server/tabletserver/TabletMutations.java ---------------------------------------------------------------------- diff --git a/server/tserver/src/main/java/org/apache/accumulo/server/tabletserver/TabletMutations.java b/server/tserver/src/main/java/org/apache/accumulo/server/tabletserver/TabletMutations.java deleted file mode 100644 index 06ac6d0..0000000 --- a/server/tserver/src/main/java/org/apache/accumulo/server/tabletserver/TabletMutations.java +++ /dev/null @@ -1,47 +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.accumulo.server.tabletserver; - -import java.util.List; - -import org.apache.accumulo.core.data.Mutation; - -public class TabletMutations { - private final int tid; - private final int seq; - private final List mutations; - - public TabletMutations(int tid, int seq, List mutations) { - this.tid = tid; - this.seq = seq; - this.mutations = mutations; - } - - public List getMutations() { - return mutations; - } - - public int getTid() { - return tid; - } - public int getSeq() { - return seq; - } - - - -}