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
1=== modified file 'README.md'
2--- README.md 2015-08-25 05:52:44 +0000
3+++ README.md 2015-09-22 03:36:37 +0000
4@@ -53,17 +53,16 @@
5 unit, locate an event, and cat it:
6
7 juju ssh flume-hdfs/0
8- hdfs dfs -ls /user/flume/<event_dir> # <-- find a date
9- hdfs dfs -ls /user/flume/<event_dir>/yy-mm-dd # <-- find an hour
10- hdfs dfs -ls /user/flume/<event_dir>/yy-mm-dd/HH # <-- find an event
11- hdfs dfs -cat /user/flume/<event_dir>/yy-mm-dd/HH/FlumeData.<id>
12+ hdfs dfs -ls /user/flume/<event_dir> # <-- find a date
13+ hdfs dfs -ls /user/flume/<event_dir>/<yyyy-mm-dd> # <-- find an event
14+ hdfs dfs -cat /user/flume/<event_dir>/<yyyy-mm-dd>/FlumeData.<id>
15
16 This process works well for data serialized in `text` format (the default).
17 For data serialized in `avro` format, you'll need to copy the file locally
18 and use the `dfs -text` command. For example, replace the `dfs -cat` command
19 from above with the following to view files stored in `avro` format:
20
21- hdfs dfs -copyToLocal /user/flume/<event_dir>/yy-mm-dd/HH/FlumeData.<id> /home/ubuntu/myFile.txt
22+ hdfs dfs -copyToLocal /user/flume/<event_dir>/<yyyy-mm-dd>/FlumeData.<id> /home/ubuntu/myFile.txt
23 hdfs dfs -text file:///home/ubuntu/myFile.txt
24
25
26
27=== added directory 'actions'
28=== added file 'actions.yaml'
29--- actions.yaml 1970-01-01 00:00:00 +0000
30+++ actions.yaml 2015-09-22 03:36:37 +0000
31@@ -0,0 +1,6 @@
32+start-flume:
33+ description: Start the Flume-HDFS daemon
34+stop-flume:
35+ description: Stop the Flume-HDFS daemon
36+restart-flume:
37+ description: Restart the Flume-HDFS daemon
38
39=== added file 'actions/restart-flume'
40--- actions/restart-flume 1970-01-01 00:00:00 +0000
41+++ actions/restart-flume 2015-09-22 03:36:37 +0000
42@@ -0,0 +1,5 @@
43+#!/bin/bash
44+
45+ps -ef | grep "flume-ng" | awk '{print $2}' | xargs kill -9
46+sleep 2
47+su flume -c "/usr/lib/flume-hdfs/bin/flume-ng agent -c /etc/flume-hdfs/conf -f /etc/flume-hdfs-conf/flume.conf -n a1"
48
49=== added file 'actions/start-flume'
50--- actions/start-flume 1970-01-01 00:00:00 +0000
51+++ actions/start-flume 2015-09-22 03:36:37 +0000
52@@ -0,0 +1,3 @@
53+#!/bin/bash
54+
55+su flume -c "/usr/lib/flume-hdfs/bin/flume-ng agent -c /etc/flume-hdfs/conf -f /etc/flume-hdfs-conf/flume.conf -n a1"
56
57=== added file 'actions/stop-flume'
58--- actions/stop-flume 1970-01-01 00:00:00 +0000
59+++ actions/stop-flume 2015-09-22 03:36:37 +0000
60@@ -0,0 +1,3 @@
61+#!/bin/bash
62+
63+ps -ef | grep "flume-ng" | awk '{print $2}' | xargs kill -9
64
65=== modified file 'config.yaml'
66--- config.yaml 2015-08-25 05:52:44 +0000
67+++ config.yaml 2015-09-22 03:36:37 +0000
68@@ -6,16 +6,42 @@
69 URL from which to fetch resources (e.g., Hadoop binaries) instead
70 of Launchpad.
71 channel_capacity:
72- type: string
73- default: '1000'
74+ type: int
75+ default: 1000
76 description: |
77 The maximum number of events stored in the channel.
78 channel_transaction_capacity:
79- type: string
80- default: '100'
81+ type: int
82+ default: 100
83 description: |
84 The maximum number of events the channel will take from a source or
85 give to a sink per transaction.
86+ dfs_replication:
87+ type: int
88+ default: 3
89+ description: |
90+ The DFS replication value. The default (3) is the same as the Namenode
91+ provided by apache-hadoop-hdfs-master, but may be overriden for this
92+ service.
93+ roll_count:
94+ type: int
95+ default: 0
96+ description: |
97+ Number of events written to file before it is rolled. A value of 0 (the
98+ default) means never roll based on number of events.
99+ roll_interval:
100+ type: int
101+ default: 300
102+ description: |
103+ Number of seconds to wait before rolling the current file. Default
104+ will roll the file after 5 minutes. A value of 0 means never roll
105+ based on a time interval.
106+ roll_size:
107+ type: string
108+ default: '10000000'
109+ description: |
110+ File size to trigger roll, in bytes. Default will roll the file once
111+ it reaches 10 MB. A value of 0 means never roll based on file size.
112 protocol:
113 type: string
114 default: 'avro'
115@@ -35,7 +61,7 @@
116 Specify the serializer used when the sink writes to HDFS. Either
117 'avro_event' or 'text' are supported.
118 source_port:
119- type: string
120- default: '4141'
121+ type: int
122+ default: 4141
123 description: |
124 Port on which the agent source is listening.
125
126=== added file 'resources/python/jujuresources-0.2.11.tar.gz'
127Binary 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
128=== removed file 'resources/python/jujuresources-0.2.9.tar.gz'
129Binary 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
130=== modified file 'templates/flume.conf.j2'
131--- templates/flume.conf.j2 2015-07-28 20:18:23 +0000
132+++ templates/flume.conf.j2 2015-09-22 03:36:37 +0000
133@@ -14,16 +14,19 @@
134
135 # channel properties
136 a1.channels.c1.type = memory
137-a1.channels.c1.capacity = {{ config['channel_capacity']}}
138-a1.channels.c1.transactionCapacity = {{ config['channel_transaction_capacity']}}
139+a1.channels.c1.capacity = {{ config['channel_capacity'] }}
140+a1.channels.c1.transactionCapacity = {{ config['channel_transaction_capacity'] }}
141
142 # sink properties
143 a1.sinks.k1.type = hdfs
144 a1.sinks.k1.channel = c1
145 a1.sinks.k1.hdfs.fileType = DataStream
146 a1.sinks.k1.hdfs.writeFormat = Text
147-a1.sinks.k1.hdfs.path = /user/flume/%{event_dir}/%y-%m-%d/%H
148+a1.sinks.k1.hdfs.path = /user/flume/%{event_dir}/%Y-%m-%d
149 a1.sinks.k1.hdfs.useLocalTimeStamp = true
150+a1.sinks.k1.hdfs.rollCount = {{ config['roll_count'] }}
151+a1.sinks.k1.hdfs.rollInterval = {{ config['roll_interval'] }}
152+a1.sinks.k1.hdfs.rollSize = {{ config['roll_size'] }}
153 a1.sinks.k1.serializer = {{ config['sink_serializer'] }}
154 a1.sinks.k1.serializer.compressionCodec = {{ config['sink_compression'] }}
155 {% if config['sink_serializer'] == 'avro_event' %}

Subscribers

People subscribed via source and target branches