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

Simple HBase Log Appender implementation #1535

Merged
merged 6 commits into from
Apr 4, 2018
Merged

Conversation

JoaoRei
Copy link
Contributor

@JoaoRei JoaoRei commented Mar 24, 2018

Hey,
This is a simple HBase Log Appender implementation, based on Cassandra Log Appender.
It was developed with HBase-0.98.6 and it was used in my master thesis project.

It provides a simple way to integrate Kaa in an Hadoop Distributed File System (HDFS) through HBase database.

@JoaoRei
Copy link
Contributor Author

JoaoRei commented Mar 24, 2018

The corresponding Jira Issue is:
KAA-1779 - A simple HBase Log Appender Implementation that provides the integration of Kaa Platform with Hadoop Distributed File System (HDFS) through HBase Log Appender

Copy link
Contributor

@rasendubi rasendubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @JoaoRei! Thanks for the patch!

  1. The build failure is not related to your changes and is safe to ignore.
  2. Please check the code style. It is inconsistent (mixed tabs and spaces, wrong indentation levels, etc.) You can find more info here: http://kaaproject.github.io/kaa/docs/v0.10.0/How-to-contribute/Code-style/Java/

@JoaoRei
Copy link
Contributor Author

JoaoRei commented Mar 25, 2018

Hi @rasendubi!
Thanks for your reply!

I made the changes in the code style to match the Google Java Style as it is stated in the documentation link you sent me.
Hope everything is alright now

<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-common</artifactId>
<version>0.98.6-hadoop2</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and below please use Dependency Management to specify dependencies versions. See example in the
appenders.

<exclude>**/logback.xml</exclude>
</excludes>
</configuration>
</plugin> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncomment this configuration.

<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.7.7</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are commonly using the Avro version specified here.
Let's use <version>${avro.version}</version> instead of <version>1.7.7</version>.

"DIFF",
"FAST_DIFF",
"PREFIX",
"PREFIX_TREE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you apply vertical alignment to this file?


LOG.info("HBase Admin Started");
} catch (Exception e) {
LOG.error("Ops!", e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to provide the more detailed error message. For example, as you do it here.

Also, it's not allowed by our check style to name variable with only one letter, replace e with ex.

//Get table and keyspace names
String table = configuration.getTableName().toString().toLowerCase().trim();
String keyspace = configuration.getKeyspace().toString().toLowerCase().trim();
LOG.info("Starting creation of table: {}",keyspace + ":" + table);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the space before keyspace.

namespacedTable = keyspace + ":" + table;

} catch (Exception e) {
LOG.error("Ops",e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See related comment above.

@sashadidukh
Copy link
Contributor

Hi, @JoaoRei!
Could you add the documentation to the HBase log appender?

See existed log appenders doc and its implementation.
Also, take a look at the Documentation style guide. It's better to open the new Pull Request with the documentation.

@rasendubi
Copy link
Contributor

rasendubi commented Apr 4, 2018

@JoaoRei I don't want this PR to rot. I see the comments are non-critical, so I'll merge it now.

Let's make it more iterative and address the comments in a separate PR if you have time and will ;)

@rasendubi rasendubi merged commit e897588 into kaaproject:master Apr 4, 2018
@JoaoRei
Copy link
Contributor Author

JoaoRei commented Apr 5, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants