Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Hadoop 3.3, HBase 2.3.0 #592

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions direct/io-bigtable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

<properties>
<shadePattern>cz.o2.proxima.bigtable.shaded</shadePattern>
<bigtable.version>1.12.0</bigtable.version>
<grpc.version>1.21.0</grpc.version>
<bigtable.version>1.19.0</bigtable.version>
<grpc.version>1.33.1</grpc.version>
</properties>

<profiles>
Expand Down Expand Up @@ -219,7 +219,7 @@

<dependency>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-hbase-1.x</artifactId>
<artifactId>bigtable-hbase-2.x</artifactId>
<version>${bigtable.version}</version>
<exclusions>
<exclusion>
Expand Down
34 changes: 34 additions & 0 deletions direct/io-hbase-bindings/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@
<version>${guava.version}</version>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
<version>${hadoop.version}</version>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
Expand Down Expand Up @@ -206,6 +212,34 @@
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-minicluster</artifactId>
<version>${hadoop.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>${hadoop.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-jobclient</artifactId>
<version>${hadoop.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.apache.hadoop.hbase.CellScanner;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.ResultScanner;
Expand All @@ -45,24 +44,17 @@
class HBaseWriter extends HBaseClientWrapper implements OnlineAttributeWriter {

private static final String DEL_BATCH_SIZE_CONF = "del-batch-size";
private static final String FLUSH_COMMITS_CFG = "flush-commits";

private final int batchSize;
private final Map<String, Object> cfg;
private final InternalSerializer serializer;

private boolean flushCommits;

HBaseWriter(URI uri, Configuration conf, Map<String, Object> cfg) {
super(uri, conf);
batchSize =
Optional.ofNullable(cfg.get(DEL_BATCH_SIZE_CONF))
.map(o -> Integer.valueOf(o.toString()))
.orElse(1000);
flushCommits =
Optional.ofNullable(cfg.get(FLUSH_COMMITS_CFG))
.map(o -> Boolean.valueOf(o.toString()))
.orElse(true);
serializer = HBaseDataAccessor.instantiateSerializer(uri);
this.cfg = cfg;
}
Expand All @@ -89,9 +81,6 @@ public void write(StreamElement data, CommitCallback statusCallback) {
Put put = serializer.toPut(family, key, data);
this.client.put(put);
}
if (flushCommits) {
((HTable) this.client).flushCommits();
}
statusCallback.commit(true, null);
} catch (Exception ex) {
log.error("Failed to write {}", data, ex);
Expand Down Expand Up @@ -148,12 +137,4 @@ private void deletePrefix(byte[] key, byte[] family, String prefix, long stamp)
stamp);
}
}

@Override
void ensureClient() {
super.ensureClient();
if (!(client instanceof HTable)) {
flushCommits = false;
}
}
}
58 changes: 0 additions & 58 deletions direct/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,63 +66,5 @@

</dependencyManagement>

<profiles>
<profile>
<id>jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<modules>
<module>compiler</module>
<module>core</module>
<module>core-testing</module>
<module>ingest-client</module>
<module>ingest-server</module>
<module>io-bigtable</module>
<module>io-blob</module>
<module>io-bulkfs</module>
<module>io-bulkfs-parquet</module>
<module>io-cassandra</module>
<module>io-gcloud-storage</module>
<module>io-hadoop</module>
<module>io-hbase</module>
<module>io-hbase-bindings</module>
<module>io-hdfs</module>
<module>io-http</module>
<module>io-kafka</module>
<module>io-pubsub</module>
<module>io-s3</module>
<module>rpc</module>
<module>transaction-manager</module>
</modules>
</profile>

<profile>
<id>jdk11</id>
<activation>
<jdk>11</jdk>
</activation>
<modules>
<module>compiler</module>
<module>core</module>
<module>core-testing</module>
<module>ingest-client</module>
<module>ingest-server</module>
<module>io-bigtable</module>
<module>io-blob</module>
<module>io-bulkfs</module>
<module>io-bulkfs-parquet</module>
<module>io-cassandra</module>
<module>io-gcloud-storage</module>
<module>io-http</module>
<module>io-kafka</module>
<module>io-pubsub</module>
<module>io-s3</module>
<module>rpc</module>
<module>transaction-manager</module>
</modules>
</profile>
</profiles>

</project>

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
<maven.protobuf.version>0.6.1</maven.protobuf.version>
<maven.compiler.plugin>3.8.1</maven.compiler.plugin>
<groovy.version>3.0.8</groovy.version>
<hadoop.version>2.10.0</hadoop.version>
<hbase.version>1.6.0</hbase.version>
<hadoop.version>3.3.0</hadoop.version>
<hbase.version>2.3.0</hbase.version>
<junit.jupiter.version>5.7.2</junit.jupiter.version>
<kafka.version>2.6.2</kafka.version>
<proto.version>3.15.8</proto.version>
Expand Down