Skip to content

Commit

Permalink
Revert "Separate mapreduce code from core (apache#425)"
Browse files Browse the repository at this point in the history
* This reverts commit 67a1c69.
* Return mapreduce code to core but maintain clean up for 2.0
  • Loading branch information
milleruntime committed Oct 23, 2018
1 parent 2e48434 commit 64a1f8d
Show file tree
Hide file tree
Showing 57 changed files with 23 additions and 166 deletions.
5 changes: 0 additions & 5 deletions assemble/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@
<artifactId>log4j</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-client-mapreduce</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-core</artifactId>
Expand Down
28 changes: 0 additions & 28 deletions client/mapreduce/.gitignore

This file was deleted.

112 changes: 0 additions & 112 deletions client/mapreduce/pom.xml

This file was deleted.

10 changes: 9 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
<include>org[.]apache[.]accumulo[.]core[.]iterators[.]IteratorUtil[$]IteratorScope</include>
</includes>
<excludes>
<exclude>.*Impl</exclude>
<exclude>.*[.]impl[.].*</exclude>
<exclude>.*[.]thrift[.].*</exclude>
<exclude>org[.]apache[.]accumulo[.]core[.]security[.]crypto[.].*</exclude>
Expand All @@ -192,16 +193,23 @@
<!--Allow API data types to reference thrift types, but do not
analyze thrift types -->
<allow>org[.]apache[.]accumulo[.].*[.]thrift[.].*</allow>
<!--Type from hadoop used in API. If adding a new type from
<!--Type from hadoop used in API. If adding a new type from
Hadoop to the Accumulo API ensure its annotated as
stable.-->
<allow>org[.]apache[.]hadoop[.]conf[.]Configuration</allow>
<allow>org[.]apache[.]hadoop[.]fs[.](FileSystem|Path)</allow>
<allow>org[.]apache[.]hadoop[.]io[.](Text|Writable|WritableComparable|WritableComparator)</allow>
<allow>org[.]apache[.]hadoop[.]mapred[.](JobConf|RecordReader|InputSplit|RecordWriter|Reporter)</allow>
<allow>org[.]apache[.]hadoop[.]mapred[.]FileOutputFormat[$]Counter</allow>
<allow>org[.]apache[.]hadoop[.]mapreduce[.](Job|JobContext|RecordReader|InputSplit|TaskAttemptContext|RecordWriter|OutputCommitter|TaskInputOutputContext)</allow>
<allow>org[.]apache[.]hadoop[.]mapreduce[.]lib[.]output[.]FileOutputFormat[$]Counter</allow>
<allow>org[.]apache[.]hadoop[.]util[.]Progressable</allow>
<!--ugghhh-->
<allow>org[.]apache[.]log4j[.](Level|Logger)</allow>
<!-- allow javax security exceptions for Authentication tokens -->
<allow>javax[.]security[.]auth[.]DestroyFailedException</allow>
<!-- allow questionable Hadoop exceptions for mapreduce -->
<allow>org[.]apache[.]hadoop[.]mapred[.](FileAlreadyExistsException|InvalidJobConfException)</allow>
<!-- allow lexicoders to throw iterator exceptions -->
<allow>org[.]apache[.]accumulo[.]core[.]iterators[.]ValueFormatException</allow>
</allows>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.accumulo.core.client.mapreduce.lib.impl;
package org.apache.accumulo.core.cli;

import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.ClientInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.accumulo.core.client.mapreduce.lib.impl;
package org.apache.accumulo.core.cli;

import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.accumulo.core.client.mapreduce.lib.impl;
package org.apache.accumulo.core.cli;

import org.apache.accumulo.core.cli.ClientOpts;
import org.apache.accumulo.core.client.Accumulo;
import org.apache.accumulo.core.client.AccumuloClient;
import org.apache.accumulo.core.client.AccumuloSecurityException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.accumulo.core.client.TableExistsException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.TableOfflineException;
import org.apache.accumulo.core.client.mapreduce.AccumuloFileOutputFormat;
import org.apache.accumulo.core.client.rfile.RFile;
import org.apache.accumulo.core.client.sample.SamplerConfiguration;
import org.apache.accumulo.core.client.summary.Summarizer;
Expand Down Expand Up @@ -531,7 +532,7 @@ Set<Range> splitRangeByTablets(String tableName, Range range, int maxSplits)

/**
* Bulk import all the files in a directory into a table. Files can be created using
* {@code AccumuloFileOutputFormat} and {@link RFile#newWriter()}
* {@link AccumuloFileOutputFormat} and {@link RFile#newWriter()}
*
* @param tableName
* the name of the table
Expand Down
3 changes: 2 additions & 1 deletion minicluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,11 @@
<include>org[.]apache[.]accumulo[.]minicluster[.].*</include>
</includes>
<excludes>
<exclude>.*Impl</exclude>
<exclude>.*[.]impl[.].*</exclude>
</excludes>
<allows>
<allow>org[.]apache[.]accumulo[.]core[.](?:client|data|security)[.](?!.*(impl|thrift|crypto).*).*</allow>
<allow>org[.]apache[.]accumulo[.]core[.](client|data|security)[.](?!.*(impl|thrift|crypto).*).*</allow>
</allows>
</configuration>
</execution>
Expand Down
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
</mailingLists>
<modules>
<module>assemble</module>
<module>client/mapreduce</module>
<module>core</module>
<module>iterator-test-harness</module>
<module>minicluster</module>
Expand Down Expand Up @@ -309,11 +308,6 @@
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-client-mapreduce</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.function.Predicate;

import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.client.mapred.AccumuloFileOutputFormat;
import org.apache.accumulo.core.client.rfile.RFile.WriterOptions;
import org.apache.accumulo.core.client.summary.Summarizer;
import org.apache.accumulo.core.client.summary.Summarizer.Combiner;
Expand Down Expand Up @@ -141,6 +142,8 @@ public Map<FileRef,DataFileValue> getFiles() {
*
* @see Summarizer
* @see TableOperations#addSummarizers(String, SummarizerConfiguration...)
* @see AccumuloFileOutputFormat#setSummarizers(org.apache.hadoop.mapred.JobConf,
* SummarizerConfiguration...)
* @see WriterOptions#withSummarizers(SummarizerConfiguration...)
*/
public List<Summary> getSummaries(Collection<FileRef> files,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.Map.Entry;
import java.util.function.Predicate;

import org.apache.accumulo.core.client.mapred.AccumuloFileOutputFormat;
import org.apache.accumulo.core.client.rfile.RFile.WriterOptions;
import org.apache.accumulo.core.client.summary.SummarizerConfiguration;
import org.apache.accumulo.core.client.summary.Summary;
Expand Down Expand Up @@ -64,8 +65,8 @@
*
* <p>
* Bulk files can be generated with summary information by calling
* {@code AccumuloFileOutputFormat#setSummarizers(JobConf, SummarizerConfiguration...)} or
* {@link WriterOptions#withSummarizers(SummarizerConfiguration...)}
* {@link AccumuloFileOutputFormat#setSummarizers(org.apache.hadoop.mapred.JobConf, SummarizerConfiguration...)}
* or {@link WriterOptions#withSummarizers(SummarizerConfiguration...)}
*
* <p>
* When this strategy does not decide to compact based on the number of deletes, then it will defer
Expand Down Expand Up @@ -104,7 +105,6 @@ public class TooManyDeletesCompactionStrategy extends DefaultCompactionStrategy

public static final String PROCEED_ZERO_NO_SUMMARY_OPT_DEFAULT = "false";

@Override
public void init(Map<String,String> options) {
this.threshold = Double.parseDouble(options.getOrDefault(THRESHOLD_OPT, THRESHOLD_OPT_DEFAULT));
if (threshold <= 0.0 || threshold > 1.0) {
Expand Down
4 changes: 0 additions & 4 deletions test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-client-mapreduce</artifactId>
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import java.util.Base64;
import java.util.Collections;

import org.apache.accumulo.core.cli.MapReduceClientOnRequiredTable;
import org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat;
import org.apache.accumulo.core.client.mapreduce.AccumuloOutputFormat;
import org.apache.accumulo.core.client.mapreduce.lib.impl.MapReduceClientOnRequiredTable;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Value;
Expand Down

0 comments on commit 64a1f8d

Please sign in to comment.