goodwill

Store for sharing schemata (Thrift, Smile, ...) between HDFS, DataWarehouses, and other

License

License

Categories

Categories

Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

com.ning
ArtifactId

ArtifactId

metrics.goodwill
Last Version

Last Version

1.2.2
Release Date

Release Date

Type

Type

war
Description

Description

goodwill
Store for sharing schemata (Thrift, Smile, ...) between HDFS, DataWarehouses, and other
Project URL

Project URL

http://github.com/pierre/goodwill
Source Code Management

Source Code Management

http://github.com/pierre/goodwill/tree/master

Download metrics.goodwill

How to add to project

<!-- https://jarcasting.com/artifacts/com.ning/metrics.goodwill/ -->
<dependency>
    <groupId>com.ning</groupId>
    <artifactId>metrics.goodwill</artifactId>
    <version>1.2.2</version>
    <type>war</type>
</dependency>
// https://jarcasting.com/artifacts/com.ning/metrics.goodwill/
implementation 'com.ning:metrics.goodwill:1.2.2'
// https://jarcasting.com/artifacts/com.ning/metrics.goodwill/
implementation ("com.ning:metrics.goodwill:1.2.2")
'com.ning:metrics.goodwill:war:1.2.2'
<dependency org="com.ning" name="metrics.goodwill" rev="1.2.2">
  <artifact name="metrics.goodwill" type="war" />
</dependency>
@Grapes(
@Grab(group='com.ning', module='metrics.goodwill', version='1.2.2')
)
libraryDependencies += "com.ning" % "metrics.goodwill" % "1.2.2"
[com.ning/metrics.goodwill "1.2.2"]

Dependencies

compile (15)

Group / Artifact Type Version
commons-lang : commons-lang jar 2.6
com.google.inject : guice jar 2.0
com.google.inject.extensions : guice-servlet jar 2.0
com.google.guava : guava jar r08
com.jolbox : bonecp jar 0.7.1-rc3
com.ning : metrics.goodwill-access jar 0.1.1
com.ning : metrics.serialization-common jar 2.0.0-pre6
com.sun.jersey : jersey-server jar 1.3
com.sun.jersey.contribs : jersey-guice jar 1.3
javax.ws.rs : jsr311-api jar 1.1.1
log4j : log4j jar 1.2.16
net.sf.opencsv : opencsv jar 2.1
org.codehaus.jackson : jackson-mapper-asl jar 1.8.1
org.skife.config : config-magic jar 0.8
org.slf4j : jul-to-slf4j jar 1.6.1

provided (2)

Group / Artifact Type Version
org.mortbay.jetty : servlet-api jar 2.5-20081211
org.netezza » nzjdbc3 jar 5.0.8-12182

runtime (3)

Group / Artifact Type Version
mysql : mysql-connector-java jar 5.1.12
org.slf4j : slf4j-api jar 1.6.1
org.slf4j : slf4j-log4j12 jar 1.6.1

test (1)

Group / Artifact Type Version
org.testng : testng jar 6.0

Project Modules

There are no modules declared in this project.

Goodwill, a Thrift types store

Goodwill is a store to share Thrift schemas.

It provides an HTML-based UI and a JSON API to create and document them. Goodwill is fully integrated with the action-core (github.com/pierre/action-core) to browse Thrift-based sequence files on HDFS. Another usecase is to export Thrift data from HDFS to a SQL-based data warehouse: Goodwill is the middle-man that defines field types and does the translation between Thrift types and SQL types.

Usage

To get started, one can use the CSV file store:

mvn -Dgoodwill.store.type=csv -Dgoodwill.store.csv.file.path=examples/file_store.csv jetty:run

This creates a store with a single type Awesomeness. You can browse it at:

http://127.0.0.1:8080/registrar

To access the API, specify the Accept header:

curl -H'Accept: application/json' http://127.0.0.1:8080/registrar/Awesomeness

Note: the CSV file store is currently read-only. If you want to fix it, look at updateType in github.com/pierre/goodwill/blob/master/src/main/java/com/ning/metrics/goodwill/store/CSVFileStore.java.

A more common usecase is to use the MySQL backend. Simply create a goodwill database and create the following table:

CREATE TABLE `thrift_types` (
`event_type` varchar(255) DEFAULT NULL,
`field_id` int(11) DEFAULT NULL,
`field_type` varchar(255) DEFAULT NULL,
`field_name` varchar(255) DEFAULT NULL,
`sql_type` varchar(255) DEFAULT NULL,
`sql_length` int(11) DEFAULT NULL,
`sql_scale` int(11) DEFAULT NULL,
`sql_precision` int(11) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_fields` (`event_type`,`field_id`)
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8

You can now run Goodwill via

mvn jetty:run

You can configure your sink via Goodwill. A sink is where the data described in Goodwill is stored. For instance, it can JDBC to your data warehouse to create the tables that will hold the events. For now, only Netezza is supported:

mvn -Dgoodwill.sink.type=netezza -Dgoodwill.sink.db.host=netezza.company.com -Dgoodwill.sink.db.name=company \
    -Dgoodwill.sink.db.user=pierre -Dgoodwill.sink.db.password=pierre -Dgoodwill.sink.db.port=5480 jetty:run

You may want to look at the configuration parameter goodwill.sink.db.extra_sql in GoodwillConfig.java to see how to customize it.

Configuration

See github.com/pierre/goodwill/blob/master/src/main/java/com/ning/metrics/goodwill/binder/config/GoodwillConfig.java.

To build

mvn package

will create a war.

License (see LICENSE-2.0.txt file for full license)

Copyright 2010 Ning

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

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.

Versions

Version
1.2.2
1.2.1
1.2.0
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1