Skip to content

Commit

Permalink
Simple HBase Log Appender Implementation, with checkstyle corrected.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoRei committed Mar 25, 2018
1 parent a4ea4ec commit 96f732c
Show file tree
Hide file tree
Showing 16 changed files with 1,694 additions and 1,304 deletions.
7 changes: 7 additions & 0 deletions server/appenders/hbase-appender/.checkstyle
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
<fileset name="all" enabled="true" check-config-name="Google Checks" local="false">
<file-match-pattern match-pattern="." include-pattern="true"/>
</fileset>
</fileset-config>
296 changes: 147 additions & 149 deletions server/appenders/hbase-appender/pom.xml
@@ -1,162 +1,160 @@
<!-- <!-- Copyright 2014-2016 CyberVision, Inc. Licensed under the Apache License,
Copyright 2014-2016 CyberVision, Inc. 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. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.kaaproject.kaa.server</groupId>
<artifactId>appenders</artifactId>
<version>0.11.0-SNAPSHOT</version>
</parent>


Licensed 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 <modelVersion>4.0.0</modelVersion>
<groupId>org.kaaproject.kaa.server.appenders</groupId>
<artifactId>hbase-appender</artifactId>
<packaging>jar</packaging>


Unless required by applicable law or agreed to in writing, software <name>HBase Log Appender</name>
distributed under the License is distributed on an "AS IS" BASIS, <url>http://kaaproject.org</url>
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.kaaproject.kaa.server</groupId>
<artifactId>appenders</artifactId>
<version>0.11.0-SNAPSHOT</version>
</parent>


<modelVersion>4.0.0</modelVersion>
<groupId>org.kaaproject.kaa.server.appenders</groupId>
<artifactId>hbase-appender</artifactId>
<packaging>jar</packaging>


<name>HBase Log Appender</name> <properties>
<url>http://kaaproject.org</url> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../../..</main.dir>
</properties>


<properties> <dependencyManagement>
<checkstyle.skip>true</checkstyle.skip> <dependencies>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <dependency>
<main.dir>${basedir}/../../..</main.dir> <groupId>com.google.guava</groupId>
</properties> <artifactId>guava</artifactId>

<version>${guava.version}</version>
<dependencyManagement> </dependency>
<dependencies> </dependencies>
<dependency> </dependencyManagement>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
</dependencies>
</dependencyManagement>


<dependencies>
<dependency>
<groupId>org.kaaproject.kaa.server.common</groupId>
<artifactId>log-shared</artifactId>
</dependency>


<dependency>
<groupId>org.kaaproject.kaa.server.common</groupId>
<artifactId>utils</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>

<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>0.98.6-hadoop2</version>
</dependency>


<dependency> <dependencies>
<groupId>org.apache.hbase</groupId> <dependency>
<artifactId>hbase-common</artifactId> <groupId>org.kaaproject.kaa.server.common</groupId>
<version>0.98.6-hadoop2</version> <artifactId>log-shared</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-protocol</artifactId>
<version>0.98.6-hadoop2</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
<version>2.4.1</version>
</dependency>


<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>org.kaaproject.kaa.server.common</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>utils</artifactId>
<version>2.5.0</version> </dependency>
</dependency> <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>


<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>org.apache.hbase</groupId>
<artifactId>netty-handler</artifactId> <artifactId>hbase-client</artifactId>
</dependency> <version>0.98.6-hadoop2</version>
<dependency> </dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>


</dependencies> <dependency>
<build> <groupId>org.apache.hbase</groupId>
<plugins> <artifactId>hbase-common</artifactId>
<version>0.98.6-hadoop2</version>
</dependency>
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-protocol</artifactId>
<version>0.98.6-hadoop2</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
<version>2.4.1</version>
</dependency>

<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.5.0</version>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.7.7</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<stringType>String</stringType>
<sourceDirectory>${basedir}/src/main/avro/</sourceDirectory>
<outputDirectory>${basedir}/src/main/java/</outputDirectory>
<fieldVisibility>PRIVATE</fieldVisibility>
<includes>
<include>*.avsc</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/logback.xml</exclude>
</excludes>
</configuration>
</plugin> -->
<plugin> <plugin>
<groupId>org.apache.avro</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>avro-maven-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>${avro.version}</version> <version>2.17</version>
<executions> <configuration>
<execution> <configLocation>google_checks.xml</configLocation>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<stringType>String</stringType>
<sourceDirectory>${basedir}/src/main/avro/</sourceDirectory>
<outputDirectory>${basedir}/src/main/java/</outputDirectory>
<fieldVisibility>PRIVATE</fieldVisibility>
<includes>
<include>*.avsc</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/logback.xml</exclude>
</excludes>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
Expand Up @@ -12,7 +12,7 @@
"name":"Server", "name":"Server",
"fields":[ "fields":[
{ {
"name":"zk_Quorum", "name":"zkQuorum",
"displayName":"Zookeeper Quorum", "displayName":"Zookeeper Quorum",
"weight":0.75, "weight":0.75,
"by_default":"localhost", "by_default":"localhost",
Expand Down Expand Up @@ -50,7 +50,7 @@
"name":"ColumnFamily", "name":"ColumnFamily",
"fields":[ "fields":[
{ {
"name":"cf_name", "name":"cfName",
"displayName":"Column Family name", "displayName":"Column Family name",
"weight":0.4, "weight":0.4,
"type":"string" "type":"string"
Expand Down Expand Up @@ -94,7 +94,7 @@
"type":"int" "type":"int"
}, },
{ {
"name":"BloomFilter", "name":"bloomFilter",
"displayName":"Bloom Filter", "displayName":"Bloom Filter",
"weight":0.2, "weight":0.2,
"by_default":"ROW", "by_default":"ROW",
Expand Down Expand Up @@ -143,14 +143,14 @@
} }
}, },
{ {
"name":"InMemory", "name":"inMemory",
"displayName":"In Memory", "displayName":"In Memory",
"weight":0.2, "weight":0.2,
"by_default":false, "by_default":false,
"type":"boolean" "type":"boolean"
}, },
{ {
"name":"KeepDeletedCells", "name":"keepDeletedCells",
"displayName":"Keep Deleted Cells", "displayName":"Keep Deleted Cells",
"weight":0.2, "weight":0.2,
"by_default":false, "by_default":false,
Expand Down Expand Up @@ -186,7 +186,7 @@
"type":"string" "type":"string"
}, },
{ {
"name":"ValueType", "name":"valueType",
"displayName":"Type", "displayName":"Type",
"weight":0.2, "weight":0.2,
"by_default":"TEXT", "by_default":"TEXT",
Expand Down Expand Up @@ -219,7 +219,7 @@
}, },


{ {
"name":"RowKey", "name":"rowKey",
"displayName":"Is part of Row key?", "displayName":"Is part of Row key?",
"weight":0.1, "weight":0.1,
"by_default":false, "by_default":false,
Expand Down

0 comments on commit 96f732c

Please sign in to comment.