Repository: gora Updated Branches: refs/heads/master ad3f69751 -> f028a548b
GORA-529 Remove org/apache/gora/avro/mapreduce/FsInput.java Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/f028a548 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/f028a548 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/f028a548 Branch: refs/heads/master Commit: f028a548b933c73c85c1f15a4900fe93fc1c4908 Parents: ad3f697 Author: Lewis John McGibbney <lewis.mcgibb...@gmail.com> Authored: Fri Dec 29 23:47:51 2017 +0000 Committer: Lewis John McGibbney <lewis.mcgibb...@gmail.com> Committed: Fri Dec 29 23:47:51 2017 +0000 ---------------------------------------------------------------------- .../org/apache/gora/avro/mapreduce/FsInput.java | 70 -------------------- .../gora/avro/mapreduce/package-info.java | 20 ------ .../gora/avro/store/DataFileAvroStore.java | 2 +- 3 files changed, 1 insertion(+), 91 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/gora/blob/f028a548/gora-core/src/main/java/org/apache/gora/avro/mapreduce/FsInput.java ---------------------------------------------------------------------- diff --git a/gora-core/src/main/java/org/apache/gora/avro/mapreduce/FsInput.java b/gora-core/src/main/java/org/apache/gora/avro/mapreduce/FsInput.java deleted file mode 100644 index bdd1ddf..0000000 --- a/gora-core/src/main/java/org/apache/gora/avro/mapreduce/FsInput.java +++ /dev/null @@ -1,70 +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.gora.avro.mapreduce; - -import java.io.Closeable; -import java.io.IOException; - -import org.apache.avro.file.SeekableInput; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FSDataInputStream; -import org.apache.hadoop.fs.Path; - -/* - * Copied from Avro trunk, when 1.4 is released and Gora switches to it - * remove this file - */ - -/** Adapt an {@link FSDataInputStream} to {@link SeekableInput}. */ -public class FsInput implements Closeable, SeekableInput { - private final FSDataInputStream stream; - private final long len; - - /** - * Construct given a path and a configuration. - * - * @param path a path on HDFS to construct - * @param conf a Hadoop {@link org.apache.hadoop.conf.Configuration} object - * @throws IOException if there is an error opening path, or obtaining a file status from the file system - */ - public FsInput(Path path, Configuration conf) throws IOException { - this.stream = path.getFileSystem(conf).open(path); - this.len = path.getFileSystem(conf).getFileStatus(path).getLen(); - } - - public long length() { - return len; - } - - public int read(byte[] b, int off, int len) throws IOException { - return stream.read(b, off, len); - } - - public void seek(long p) throws IOException { - stream.seek(p); - } - - public long tell() throws IOException { - return stream.getPos(); - } - - public void close() throws IOException { - stream.close(); - } -} http://git-wip-us.apache.org/repos/asf/gora/blob/f028a548/gora-core/src/main/java/org/apache/gora/avro/mapreduce/package-info.java ---------------------------------------------------------------------- diff --git a/gora-core/src/main/java/org/apache/gora/avro/mapreduce/package-info.java b/gora-core/src/main/java/org/apache/gora/avro/mapreduce/package-info.java deleted file mode 100644 index 2f88a66..0000000 --- a/gora-core/src/main/java/org/apache/gora/avro/mapreduce/package-info.java +++ /dev/null @@ -1,20 +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. - */ -/** - * {@link org.apache.gora.avro.mapreduce.FsInput} - */ -package org.apache.gora.avro.mapreduce; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/f028a548/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java ---------------------------------------------------------------------- diff --git a/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java b/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java index 35c4cbf..afbdad1 100644 --- a/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java +++ b/gora-core/src/main/java/org/apache/gora/avro/store/DataFileAvroStore.java @@ -22,7 +22,7 @@ import java.io.IOException; import org.apache.avro.file.DataFileReader; import org.apache.avro.file.DataFileWriter; -import org.apache.gora.avro.mapreduce.FsInput; +import org.apache.avro.mapred.FsInput; import org.apache.gora.avro.query.DataFileAvroResult; import org.apache.gora.persistency.impl.PersistentBase; import org.apache.gora.query.Query;