Merge lp:~bigdata-dev/charms/trusty/apache-flume-hdfs/trunk into lp:charms/trusty/apache-flume-hdfs

Proposed by Kevin W Monroe
Status: Merged
Merged at revision: 3
Proposed branch: lp:~bigdata-dev/charms/trusty/apache-flume-hdfs/trunk
Merge into: lp:charms/trusty/apache-flume-hdfs
Diff against target: 155 lines (+59/-14) (has conflicts)
7 files modified
README.md (+4/-5)
actions.yaml (+6/-0)
actions/restart-flume (+5/-0)
actions/start-flume (+3/-0)
actions/stop-flume (+3/-0)
config.yaml (+32/-6)
templates/flume.conf.j2 (+6/-3)
Conflict adding files to actions.  Moved to root.
Conflict adding files to actions.yaml.  Moved to root.
To merge this branch: bzr merge lp:~bigdata-dev/charms/trusty/apache-flume-hdfs/trunk
Reviewer Review Type Date Requested Status
Kevin W Monroe Approve
Review via email: mp+271902@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Kevin W Monroe (kwmonroe) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README.md'
--- README.md 2015-08-25 05:52:44 +0000
+++ README.md 2015-09-22 03:36:37 +0000
@@ -53,17 +53,16 @@
53unit, locate an event, and cat it:53unit, locate an event, and cat it:
5454
55 juju ssh flume-hdfs/055 juju ssh flume-hdfs/0
56 hdfs dfs -ls /user/flume/<event_dir> # <-- find a date56 hdfs dfs -ls /user/flume/<event_dir> # <-- find a date
57 hdfs dfs -ls /user/flume/<event_dir>/yy-mm-dd # <-- find an hour57 hdfs dfs -ls /user/flume/<event_dir>/<yyyy-mm-dd> # <-- find an event
58 hdfs dfs -ls /user/flume/<event_dir>/yy-mm-dd/HH # <-- find an event58 hdfs dfs -cat /user/flume/<event_dir>/<yyyy-mm-dd>/FlumeData.<id>
59 hdfs dfs -cat /user/flume/<event_dir>/yy-mm-dd/HH/FlumeData.<id>
6059
61This process works well for data serialized in `text` format (the default).60This process works well for data serialized in `text` format (the default).
62For data serialized in `avro` format, you'll need to copy the file locally61For data serialized in `avro` format, you'll need to copy the file locally
63and use the `dfs -text` command. For example, replace the `dfs -cat` command62and use the `dfs -text` command. For example, replace the `dfs -cat` command
64from above with the following to view files stored in `avro` format:63from above with the following to view files stored in `avro` format:
6564
66 hdfs dfs -copyToLocal /user/flume/<event_dir>/yy-mm-dd/HH/FlumeData.<id> /home/ubuntu/myFile.txt65 hdfs dfs -copyToLocal /user/flume/<event_dir>/<yyyy-mm-dd>/FlumeData.<id> /home/ubuntu/myFile.txt
67 hdfs dfs -text file:///home/ubuntu/myFile.txt66 hdfs dfs -text file:///home/ubuntu/myFile.txt
6867
6968
7069
=== added directory 'actions'
=== added file 'actions.yaml'
--- actions.yaml 1970-01-01 00:00:00 +0000
+++ actions.yaml 2015-09-22 03:36:37 +0000
@@ -0,0 +1,6 @@
1start-flume:
2 description: Start the Flume-HDFS daemon
3stop-flume:
4 description: Stop the Flume-HDFS daemon
5restart-flume:
6 description: Restart the Flume-HDFS daemon
07
=== added file 'actions/restart-flume'
--- actions/restart-flume 1970-01-01 00:00:00 +0000
+++ actions/restart-flume 2015-09-22 03:36:37 +0000
@@ -0,0 +1,5 @@
1#!/bin/bash
2
3ps -ef | grep "flume-ng" | awk '{print $2}' | xargs kill -9
4sleep 2
5su flume -c "/usr/lib/flume-hdfs/bin/flume-ng agent -c /etc/flume-hdfs/conf -f /etc/flume-hdfs-conf/flume.conf -n a1"
06
=== added file 'actions/start-flume'
--- actions/start-flume 1970-01-01 00:00:00 +0000
+++ actions/start-flume 2015-09-22 03:36:37 +0000
@@ -0,0 +1,3 @@
1#!/bin/bash
2
3su flume -c "/usr/lib/flume-hdfs/bin/flume-ng agent -c /etc/flume-hdfs/conf -f /etc/flume-hdfs-conf/flume.conf -n a1"
04
=== added file 'actions/stop-flume'
--- actions/stop-flume 1970-01-01 00:00:00 +0000
+++ actions/stop-flume 2015-09-22 03:36:37 +0000
@@ -0,0 +1,3 @@
1#!/bin/bash
2
3ps -ef | grep "flume-ng" | awk '{print $2}' | xargs kill -9
04
=== modified file 'config.yaml'
--- config.yaml 2015-08-25 05:52:44 +0000
+++ config.yaml 2015-09-22 03:36:37 +0000
@@ -6,16 +6,42 @@
6 URL from which to fetch resources (e.g., Hadoop binaries) instead6 URL from which to fetch resources (e.g., Hadoop binaries) instead
7 of Launchpad.7 of Launchpad.
8 channel_capacity:8 channel_capacity:
9 type: string9 type: int
10 default: '1000'10 default: 1000
11 description: |11 description: |
12 The maximum number of events stored in the channel.12 The maximum number of events stored in the channel.
13 channel_transaction_capacity:13 channel_transaction_capacity:
14 type: string14 type: int
15 default: '100'15 default: 100
16 description: |16 description: |
17 The maximum number of events the channel will take from a source or17 The maximum number of events the channel will take from a source or
18 give to a sink per transaction.18 give to a sink per transaction.
19 dfs_replication:
20 type: int
21 default: 3
22 description: |
23 The DFS replication value. The default (3) is the same as the Namenode
24 provided by apache-hadoop-hdfs-master, but may be overriden for this
25 service.
26 roll_count:
27 type: int
28 default: 0
29 description: |
30 Number of events written to file before it is rolled. A value of 0 (the
31 default) means never roll based on number of events.
32 roll_interval:
33 type: int
34 default: 300
35 description: |
36 Number of seconds to wait before rolling the current file. Default
37 will roll the file after 5 minutes. A value of 0 means never roll
38 based on a time interval.
39 roll_size:
40 type: string
41 default: '10000000'
42 description: |
43 File size to trigger roll, in bytes. Default will roll the file once
44 it reaches 10 MB. A value of 0 means never roll based on file size.
19 protocol:45 protocol:
20 type: string46 type: string
21 default: 'avro'47 default: 'avro'
@@ -35,7 +61,7 @@
35 Specify the serializer used when the sink writes to HDFS. Either61 Specify the serializer used when the sink writes to HDFS. Either
36 'avro_event' or 'text' are supported.62 'avro_event' or 'text' are supported.
37 source_port:63 source_port:
38 type: string64 type: int
39 default: '4141'65 default: 4141
40 description: |66 description: |
41 Port on which the agent source is listening.67 Port on which the agent source is listening.
4268
=== added file 'resources/python/jujuresources-0.2.11.tar.gz'
43Binary files resources/python/jujuresources-0.2.11.tar.gz 1970-01-01 00:00:00 +0000 and resources/python/jujuresources-0.2.11.tar.gz 2015-09-22 03:36:37 +0000 differ69Binary files resources/python/jujuresources-0.2.11.tar.gz 1970-01-01 00:00:00 +0000 and resources/python/jujuresources-0.2.11.tar.gz 2015-09-22 03:36:37 +0000 differ
=== removed file 'resources/python/jujuresources-0.2.9.tar.gz'
44Binary files resources/python/jujuresources-0.2.9.tar.gz 2015-07-22 14:25:27 +0000 and resources/python/jujuresources-0.2.9.tar.gz 1970-01-01 00:00:00 +0000 differ70Binary files resources/python/jujuresources-0.2.9.tar.gz 2015-07-22 14:25:27 +0000 and resources/python/jujuresources-0.2.9.tar.gz 1970-01-01 00:00:00 +0000 differ
=== modified file 'templates/flume.conf.j2'
--- templates/flume.conf.j2 2015-07-28 20:18:23 +0000
+++ templates/flume.conf.j2 2015-09-22 03:36:37 +0000
@@ -14,16 +14,19 @@
1414
15# channel properties15# channel properties
16a1.channels.c1.type = memory16a1.channels.c1.type = memory
17a1.channels.c1.capacity = {{ config['channel_capacity']}}17a1.channels.c1.capacity = {{ config['channel_capacity'] }}
18a1.channels.c1.transactionCapacity = {{ config['channel_transaction_capacity']}}18a1.channels.c1.transactionCapacity = {{ config['channel_transaction_capacity'] }}
1919
20# sink properties20# sink properties
21a1.sinks.k1.type = hdfs21a1.sinks.k1.type = hdfs
22a1.sinks.k1.channel = c122a1.sinks.k1.channel = c1
23a1.sinks.k1.hdfs.fileType = DataStream23a1.sinks.k1.hdfs.fileType = DataStream
24a1.sinks.k1.hdfs.writeFormat = Text24a1.sinks.k1.hdfs.writeFormat = Text
25a1.sinks.k1.hdfs.path = /user/flume/%{event_dir}/%y-%m-%d/%H25a1.sinks.k1.hdfs.path = /user/flume/%{event_dir}/%Y-%m-%d
26a1.sinks.k1.hdfs.useLocalTimeStamp = true26a1.sinks.k1.hdfs.useLocalTimeStamp = true
27a1.sinks.k1.hdfs.rollCount = {{ config['roll_count'] }}
28a1.sinks.k1.hdfs.rollInterval = {{ config['roll_interval'] }}
29a1.sinks.k1.hdfs.rollSize = {{ config['roll_size'] }}
27a1.sinks.k1.serializer = {{ config['sink_serializer'] }}30a1.sinks.k1.serializer = {{ config['sink_serializer'] }}
28a1.sinks.k1.serializer.compressionCodec = {{ config['sink_compression'] }}31a1.sinks.k1.serializer.compressionCodec = {{ config['sink_compression'] }}
29{% if config['sink_serializer'] == 'avro_event' %}32{% if config['sink_serializer'] == 'avro_event' %}

Subscribers

People subscribed via source and target branches