Skip to content

Commit

Permalink
[#1269] Migrate Bytes class from HBase to Gradoop (#1407)
Browse files Browse the repository at this point in the history
fixes #1269
  • Loading branch information
timo95 authored and Kevin Gómez committed Oct 17, 2019
1 parent 50b81ab commit abfd206
Show file tree
Hide file tree
Showing 39 changed files with 1,315 additions and 161 deletions.
3 changes: 2 additions & 1 deletion NOTICE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Copyright 2014-2019 Leipzig University (Database Research Group)
This project bundles the following dependencies under the Apache Software License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)

- com.github.s1ck:gdl:0.3
- com.google.guava:guava
- com.google.guava:guava:11.0.2
- commons-cli:commons-cli:1.4
- commons-lang:commons-lang:2.6
- log4j:log4j:1.2.17
- me.lemire.integercompression:JavaFastPFOR:0.1.10
- org.codehaus.jettison:jettison:1.3.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<suppress checks="IllegalCatch"
files="PrintTableSink"
lines="90-100"/>
<suppress checks="IllegalImport"
files="Bytes.java"
lines="20"/>
<suppress checks="LineLength"
files="SocialNetworkGraph.java"
lines="0-68"/>
Expand Down
24 changes: 6 additions & 18 deletions gradoop-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,14 @@

<dependencies>
<!-- Compile dependencies -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<!-- HBase -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-common</artifactId>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>

<!-- Flink -->
Expand All @@ -145,21 +148,6 @@

<!-- Test dependencies -->

<!-- HBase -->
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-testing-util</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<!-- Others -->
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package org.gradoop.common.model.impl.id;

import edu.umd.cs.findbugs.annotations.SuppressWarnings;
import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;
import org.apache.flink.core.memory.MemorySegment;
Expand Down Expand Up @@ -326,7 +325,6 @@ public static GradoopId fromByteArray(byte[] bytes) {
*
* @return Byte representation
*/
@SuppressWarnings(value = "EI_EXPOSE_REP", justification = "never mutated")
public byte[] toByteArray() {
return bytes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
*/
package org.gradoop.common.model.impl.properties;

import org.apache.hadoop.hbase.util.Bytes;
import org.gradoop.common.model.impl.properties.bytes.Bytes;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

import static org.apache.hadoop.hbase.util.Bytes.SIZEOF_INT;
import static org.gradoop.common.model.impl.properties.bytes.Bytes.SIZEOF_INT;

/**
* Serializer for Java 8 {@code LocalDate, LocalTime, LocalDateTime}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.flink.core.memory.DataOutputView;
import org.apache.flink.core.memory.DataOutputViewStreamWrapper;
import org.apache.flink.types.Value;
import org.apache.hadoop.hbase.util.Bytes;
import org.gradoop.common.model.impl.properties.bytes.Bytes;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ private static float floatValue(PropertyValue value, int type) {
/**
* Byte utilities.
*/
public static class Bytes {
public static class BytesUtils {

/**
* Get the raw byte representation of a {@link PropertyValue} instance without the type byte as prefix.
Expand Down
Loading

0 comments on commit abfd206

Please sign in to comment.