This is the real meat of the page,
25 | and represents the text we want.
26 | It has lots of juicy content.
27 |
28 | We assume that it won't get filtered out.
29 | And that all of the lines will be in the
30 | output.
31 |
32 |
33 |
34 | Here's another paragraph of text.
35 | This is the end of the text.
36 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/flume-ng-clients/flume-ng-log4jappender/src/test/resources/flume-log4jtest.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | log4j.appender.out2 = org.apache.flume.clients.log4jappender.Log4jAppender
18 | log4j.appender.out2.Port = 25430
19 | log4j.appender.out2.Hostname = localhost
20 | log4j.logger.org.apache.flume.clients.log4jappender = DEBUG,out2
--------------------------------------------------------------------------------
/flume-ng-clients/flume-ng-log4jappender/src/test/resources/flume-loadbalancinglog4jtest.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | log4j.appender.out2 = org.apache.flume.clients.log4jappender.LoadBalancingLog4jAppender
18 | log4j.appender.out2.Hosts = localhost:25430 localhost:25431
19 | log4j.logger.org.apache.flume.clients.log4jappender = DEBUG,out2
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/serialization/Seekable.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.serialization;
19 |
20 | import java.io.IOException;
21 |
22 | public interface Seekable {
23 | void seek(long position) throws IOException;
24 | long tell() throws IOException;
25 | }
26 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/formatter/output/EventFormatter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.formatter.output;
21 |
22 | import org.apache.flume.Event;
23 |
24 | @Deprecated
25 | public interface EventFormatter {
26 |
27 | public byte[] format(Event event);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/test-morphlines/noOperation.conf:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | morphlines : [
19 | {
20 | id : morphline1
21 | importCommands : ["com.cloudera.**"]
22 |
23 | commands : [
24 | { logDebug { format : "output record: {}", args : ["@{}"] } }
25 | ]
26 | }
27 | ]
28 |
--------------------------------------------------------------------------------
/flume-ng-core/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | log4j.rootLogger = INFO, out
19 |
20 | log4j.appender.out = org.apache.log4j.ConsoleAppender
21 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
22 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
23 |
24 | log4j.logger.org.apache.flume = DEBUG
25 |
--------------------------------------------------------------------------------
/flume-ng-node/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | log4j.rootCategory = INFO, out
19 |
20 | log4j.appender.out = org.apache.log4j.ConsoleAppender
21 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
22 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
23 |
24 | log4j.logger.org.apache.flume = DEBUG
25 |
--------------------------------------------------------------------------------
/flume-ng-sdk/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | log4j.rootLogger = INFO, out
19 |
20 | log4j.appender.out = org.apache.log4j.ConsoleAppender
21 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
22 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
23 |
24 | log4j.logger.org.apache.flume = DEBUG
25 |
--------------------------------------------------------------------------------
/flume-ng-tests/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 |
19 | log4j.rootLogger = INFO, out
20 |
21 | log4j.appender.out = org.apache.log4j.ConsoleAppender
22 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
23 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
24 |
25 | log4j.logger.org.apache.flume = DEBUG
26 |
--------------------------------------------------------------------------------
/flume-ng-embedded-agent/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | log4j.rootLogger = INFO, out
19 |
20 | log4j.appender.out = org.apache.log4j.ConsoleAppender
21 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
22 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
23 |
24 | log4j.logger.org.apache.flume = DEBUG
25 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/serialization/LengthMeasurable.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.serialization;
19 |
20 | import java.io.IOException;
21 |
22 | public interface LengthMeasurable {
23 |
24 | /** returns the total length of the stream or file */
25 | long length() throws IOException;
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-jdbc-sink/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | log4j.rootLogger = INFO, out
19 |
20 | log4j.appender.out = org.apache.log4j.ConsoleAppender
21 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
22 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
23 |
24 | log4j.logger.org.apache.flume = DEBUG
25 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/ChannelFactory.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume;
19 |
20 |
21 | public interface ChannelFactory {
22 |
23 | public Channel create(String name, String type) throws FlumeException;
24 |
25 | public Class extends Channel> getClass(String type)
26 | throws FlumeException;
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 |
19 | log4j.rootLogger = INFO, out
20 |
21 | log4j.appender.out = org.apache.log4j.ConsoleAppender
22 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
23 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
24 |
25 | log4j.logger.org.apache.flume = DEBUG
26 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/SinkFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume;
21 |
22 |
23 | public interface SinkFactory {
24 |
25 | public Sink create(String name, String type)
26 | throws FlumeException;
27 |
28 | public Class extends Sink> getClass(String type)
29 | throws FlumeException;
30 | }
31 |
--------------------------------------------------------------------------------
/flume-ng-embedded-agent/src/main/java/org/apache/flume/agent/embedded/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | /**
20 | * This package provides Flume users the ability to embed simple agents
21 | * in applications. For specific and up to date information, please see
22 | * the Flume Developer Guide.
23 | */
24 | package org.apache.flume.agent.embedded;
25 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/SystemClock.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume;
20 |
21 | /**
22 | * Default implementation of Clock which uses System
23 | */
24 | public class SystemClock implements Clock {
25 |
26 | public long currentTimeMillis() {
27 | return System.currentTimeMillis();
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/flume-ng-legacy-sources/flume-thrift-source/src/main/java/README:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | The com directory contains generated java source from thrift. This
21 | is to support backward compatibility with 0.9.x flume. The 1.0 version
22 | of Flume doesn't use thrift so in order to avoid depenancy on thrift
23 | compiler, the generated sources are checked into the source tree.
24 |
--------------------------------------------------------------------------------
/flume-ng-legacy-sources/flume-thrift-source/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 |
19 | log4j.rootLogger = DEBUG, out
20 |
21 | log4j.appender.out = org.apache.log4j.ConsoleAppender
22 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
23 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
24 |
25 | log4j.logger.org.apache.flume = DEBUG
26 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-elasticsearch-sink/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 |
19 | log4j.rootLogger = DEBUG, out
20 |
21 | log4j.appender.out = org.apache.log4j.ConsoleAppender
22 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
23 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
24 |
25 | log4j.logger.org.apache.flume = DEBUG
26 |
--------------------------------------------------------------------------------
/flume-ng-clients/flume-ng-log4jappender/src/test/resources/flume-log4jtest-avro-reflect.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | log4j.appender.out2 = org.apache.flume.clients.log4jappender.Log4jAppender
18 | log4j.appender.out2.Port = 25430
19 | log4j.appender.out2.Hostname = localhost
20 | log4j.appender.out2.AvroReflectionEnabled = true
21 | log4j.logger.org.apache.flume.clients.log4jappender = DEBUG,out2
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/SourceFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume;
21 |
22 |
23 | public interface SourceFactory {
24 |
25 | public Source create(String sourceName, String type)
26 | throws FlumeException;
27 |
28 | public Class extends Source> getClass(String type)
29 | throws FlumeException;
30 | }
31 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/instrumentation/SinkProcessorCounter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.instrumentation;
20 |
21 | public class SinkProcessorCounter extends MonitoredCounterGroup {
22 |
23 | protected SinkProcessorCounter(String name) {
24 | super(MonitoredCounterGroup.Type.SINK_PROCESSOR, name);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/test-documents/testRDF.rdf:
--------------------------------------------------------------------------------
1 |
2 |
18 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/flume-ng-tests/src/main/java/org/apache/flume/Dummy.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.flume;
20 |
21 | /**
22 | * Placeholder class so the git mirror does not leave out the src/main/java dir
23 | */
24 | public class Dummy {
25 |
26 | public Dummy() {
27 | throw new UnsupportedOperationException("Dummy class meant for use");
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/flume-ng-sources/flume-scribe-source/src/main/thrift/scribe-source.thrift:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 |
21 | namespace java org.apache.flume.source.scribe
22 |
23 | enum ResultCode {
24 | OK,TRY_LATER
25 | }
26 |
27 | struct LogEntry {
28 | 1: string category,
29 | 2: string message
30 | }
31 |
32 | service Scribe {
33 | ResultCode Log(1: list messages);
34 | }
--------------------------------------------------------------------------------
/flume-ng-tests/src/test/resources/rpc-client-test.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | rpccagent.sources = src1
19 | rpccagent.channels = ch1
20 |
21 | rpccagent.sources.src1.type = avro
22 | rpccagent.sources.src1.bind = 127.0.0.1
23 | rpccagent.sources.src1.port = 12121
24 | rpccagent.sources.src1.channels = ch1
25 |
26 | rpccagent.channels.ch1.type = memory
27 | rpccagent.channels.ch1.capacity = 100
28 |
--------------------------------------------------------------------------------
/flume-ng-clients/flume-ng-log4jappender/src/test/resources/flume-log4jtest-avro-generic.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | log4j.appender.out2 = org.apache.flume.clients.log4jappender.Log4jAppender
18 | log4j.appender.out2.Port = 25430
19 | log4j.appender.out2.Hostname = localhost
20 | log4j.appender.out2.AvroSchemaUrl = file:///tmp/myrecord.avsc
21 | log4j.logger.org.apache.flume.clients.log4jappender = DEBUG,out2
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/instrumentation/ChannelProcessorCounter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.instrumentation;
20 |
21 | public class ChannelProcessorCounter extends MonitoredCounterGroup {
22 |
23 | protected ChannelProcessorCounter(String name) {
24 | super(MonitoredCounterGroup.Type.CHANNEL_PROCESSOR, name);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-jdbc-sink/src/main/java/org/apache/flume/sink/jdbc/CustomParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.sink.jdbc;
20 |
21 | /**
22 | * A subclass of parameter used to identify custom parameters.
23 | */
24 | public abstract class CustomParameter extends Parameter {
25 |
26 | public CustomParameter(final int id) {
27 | super(id);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/solr/collection1/conf/lang/stopwords_ga.txt:
--------------------------------------------------------------------------------
1 |
2 | a
3 | ach
4 | ag
5 | agus
6 | an
7 | aon
8 | ar
9 | arna
10 | as
11 | b'
12 | ba
13 | beirt
14 | bhúr
15 | caoga
16 | ceathair
17 | ceathrar
18 | chomh
19 | chtó
20 | chuig
21 | chun
22 | cois
23 | céad
24 | cúig
25 | cúigear
26 | d'
27 | daichead
28 | dar
29 | de
30 | deich
31 | deichniúr
32 | den
33 | dhá
34 | do
35 | don
36 | dtí
37 | dá
38 | dár
39 | dó
40 | faoi
41 | faoin
42 | faoina
43 | faoinár
44 | fara
45 | fiche
46 | gach
47 | gan
48 | go
49 | gur
50 | haon
51 | hocht
52 | i
53 | iad
54 | idir
55 | in
56 | ina
57 | ins
58 | inár
59 | is
60 | le
61 | leis
62 | lena
63 | lenár
64 | m'
65 | mar
66 | mo
67 | mé
68 | na
69 | nach
70 | naoi
71 | naonúr
72 | ná
73 | ní
74 | níor
75 | nó
76 | nócha
77 | ocht
78 | ochtar
79 | os
80 | roimh
81 | sa
82 | seacht
83 | seachtar
84 | seachtó
85 | seasca
86 | seisear
87 | siad
88 | sibh
89 | sinn
90 | sna
91 | sé
92 | sí
93 | tar
94 | thar
95 | thú
96 | triúr
97 | trí
98 | trína
99 | trínár
100 | tríocha
101 | tú
102 | um
103 | ár
104 | é
105 | éis
106 | í
107 | ó
108 | ón
109 | óna
110 | ónár
111 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/EventDrivenSource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume;
21 |
22 | /**
23 | * A {@link Source} that does not need an external driver to poll for
24 | * {@linkplain Event events} to ingest; it provides its own event-driven
25 | * mechanism to invoke event processing.
26 | */
27 | public interface EventDrivenSource extends Source {
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/flume-ng-clients/flume-ng-log4jappender/src/test/resources/flume-loadbalancing-backoff-log4jtest.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | log4j.appender.out2 = org.apache.flume.clients.log4jappender.LoadBalancingLog4jAppender
18 | log4j.appender.out2.Hosts = localhost:25430 localhost:25431 localhost:25432
19 | log4j.appender.out2.Selector = ROUND_ROBIN
20 | log4j.appender.out2.MaxBackoff = 30000
21 | log4j.logger.org.apache.flume.clients.log4jappender = DEBUG,out2
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-hdfs-sink/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | log4j.rootLogger = INFO, out
19 |
20 | log4j.appender.out = org.apache.log4j.ConsoleAppender
21 | log4j.appender.out.layout = org.apache.log4j.PatternLayout
22 | log4j.appender.out.layout.ConversionPattern = %d (%t) [%p - %l] %m%n
23 |
24 | log4j.logger.org.apache.flume = DEBUG
25 | log4j.logger.org.apache.hadoop = WARN
26 | log4j.logger.org.mortbay = WARN
27 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestJdbcChannelProvider.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.channel.jdbc;
19 |
20 | import org.apache.flume.Context;
21 |
22 | public class TestJdbcChannelProvider extends BaseJdbcChannelProviderTest {
23 |
24 | @Override
25 | protected void configureChannel(Context context) {
26 | // using default configuration
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/annotations/Disposable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.annotations;
21 | import java.lang.annotation.Target;
22 | import java.lang.annotation.Retention;
23 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
24 | import static java.lang.annotation.ElementType.TYPE;
25 |
26 | @Target({ TYPE }) @Retention(RUNTIME)
27 | public @interface Disposable {}
28 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/annotations/Recyclable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.annotations;
21 | import java.lang.annotation.Target;
22 | import java.lang.annotation.Retention;
23 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
24 | import static java.lang.annotation.ElementType.TYPE;
25 |
26 | @Target({ TYPE }) @Retention(RUNTIME)
27 | public @interface Recyclable {}
28 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/solr/collection1/conf/lang/stopwords_eu.txt:
--------------------------------------------------------------------------------
1 | # example set of basque stopwords
2 | al
3 | anitz
4 | arabera
5 | asko
6 | baina
7 | bat
8 | batean
9 | batek
10 | bati
11 | batzuei
12 | batzuek
13 | batzuetan
14 | batzuk
15 | bera
16 | beraiek
17 | berau
18 | berauek
19 | bere
20 | berori
21 | beroriek
22 | beste
23 | bezala
24 | da
25 | dago
26 | dira
27 | ditu
28 | du
29 | dute
30 | edo
31 | egin
32 | ere
33 | eta
34 | eurak
35 | ez
36 | gainera
37 | gu
38 | gutxi
39 | guzti
40 | haiei
41 | haiek
42 | haietan
43 | hainbeste
44 | hala
45 | han
46 | handik
47 | hango
48 | hara
49 | hari
50 | hark
51 | hartan
52 | hau
53 | hauei
54 | hauek
55 | hauetan
56 | hemen
57 | hemendik
58 | hemengo
59 | hi
60 | hona
61 | honek
62 | honela
63 | honetan
64 | honi
65 | hor
66 | hori
67 | horiei
68 | horiek
69 | horietan
70 | horko
71 | horra
72 | horrek
73 | horrela
74 | horretan
75 | horri
76 | hortik
77 | hura
78 | izan
79 | ni
80 | noiz
81 | nola
82 | non
83 | nondik
84 | nongo
85 | nor
86 | nora
87 | ze
88 | zein
89 | zen
90 | zenbait
91 | zenbat
92 | zer
93 | zergatik
94 | ziren
95 | zituen
96 | zu
97 | zuek
98 | zuen
99 | zuten
100 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/test-morphlines/readClob.conf:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | morphlines : [
19 | {
20 | id : morphline1
21 | importCommands : ["com.cloudera.**", "org.apache.solr.**"]
22 |
23 | commands : [
24 | {
25 | readClob {
26 | charset : UTF-8
27 | }
28 | }
29 | { logDebug { format : "output record: {}", args : ["@{}"] } }
30 | ]
31 | }
32 | ]
33 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/serialization/DecodeErrorPolicy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.serialization;
21 |
22 | import org.apache.flume.annotations.InterfaceAudience;
23 | import org.apache.flume.annotations.InterfaceStability;
24 |
25 | @InterfaceAudience.Private
26 | @InterfaceStability.Evolving
27 | public enum DecodeErrorPolicy {
28 | FAIL,
29 | REPLACE,
30 | IGNORE
31 | }
32 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/solr/collection1/conf/lang/userdict_ja.txt:
--------------------------------------------------------------------------------
1 | #
2 | # This is a sample user dictionary for Kuromoji (JapaneseTokenizer)
3 | #
4 | # Add entries to this file in order to override the statistical model in terms
5 | # of segmentation, readings and part-of-speech tags. Notice that entries do
6 | # not have weights since they are always used when found. This is by-design
7 | # in order to maximize ease-of-use.
8 | #
9 | # Entries are defined using the following CSV format:
10 | # , ... , ... ,
11 | #
12 | # Notice that a single half-width space separates tokens and readings, and
13 | # that the number tokens and readings must match exactly.
14 | #
15 | # Also notice that multiple entries with the same is undefined.
16 | #
17 | # Whitespace only lines are ignored. Comments are not allowed on entry lines.
18 | #
19 |
20 | # Custom segmentation for kanji compounds
21 | 日本経済新聞,日本 経済 新聞,ニホン ケイザイ シンブン,カスタム名詞
22 | 関西国際空港,関西 国際 空港,カンサイ コクサイ クウコウ,カスタム名詞
23 |
24 | # Custom segmentation for compound katakana
25 | トートバッグ,トート バッグ,トート バッグ,かずカナ名詞
26 | ショルダーバッグ,ショルダー バッグ,ショルダー バッグ,かずカナ名詞
27 |
28 | # Custom reading for former sumo wrestler
29 | 朝青龍,朝青龍,アサショウリュウ,カスタム人名
30 |
--------------------------------------------------------------------------------
/flume-ng-sdk/src/main/avro/flume.avdl:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | @namespace("org.apache.flume.source.avro")
21 |
22 | protocol AvroSourceProtocol {
23 |
24 | enum Status {
25 | OK, FAILED, UNKNOWN
26 | }
27 |
28 | record AvroFlumeEvent {
29 | map headers;
30 | bytes body;
31 | }
32 |
33 | Status append( AvroFlumeEvent event );
34 |
35 | Status appendBatch( array events );
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-jdbc-sink/src/main/java/org/apache/flume/sink/jdbc/BodyParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.sink.jdbc;
20 |
21 | /**
22 | * A subclass of parameter used to identify parameters that read from the event
23 | * body (and not a header).
24 | */
25 | public abstract class BodyParameter extends Parameter {
26 |
27 | public BodyParameter(final int id) {
28 | super(id);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.lifecycle;
21 |
22 | public enum LifecycleState {
23 | IDLE, START, STOP, ERROR;
24 |
25 | public static final LifecycleState[] START_OR_ERROR = new LifecycleState[] {
26 | START, ERROR };
27 | public static final LifecycleState[] STOP_OR_ERROR = new LifecycleState[] {
28 | STOP, ERROR };
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/README.md:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | # Flume Morphline Solr Sink
19 |
20 | This module contains a Flume Morphline Solr Sink that extracts search documents from Flume events, transforms them and loads them in Near Real Time into Apache Solr, typically a SolrCloud. This sink is intended to be used alongside the HdfsSink. It is designed to process not just structured data, but also arbitrary raw data, including data from many heterogeneous data sources.
21 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-jdbc-channel/src/test/java/org/apache/flume/channel/jdbc/TestJdbcChannelProviderNoFK.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.channel.jdbc;
19 |
20 | import org.apache.flume.Context;
21 |
22 | public class TestJdbcChannelProviderNoFK extends BaseJdbcChannelProviderTest {
23 |
24 | @Override
25 | protected void configureChannel(Context context) {
26 | context.put(ConfigurationConstants.CONFIG_CREATE_FK, "false");
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/flume-ng-clients/flume-ng-log4jappender/src/test/resources/flume-loadbalancing-rnd-log4jtest.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | log4j.appender.out2 = org.apache.flume.clients.log4jappender.LoadBalancingLog4jAppender
18 | log4j.appender.out2.Hosts = localhost:25430 localhost:25431 localhost:25432 localhost:25433 localhost:25434 localhost:25435 localhost:25436 localhost:25437 localhost:25438 localhost:25439
19 | log4j.appender.out2.Selector = RANDOM
20 | log4j.logger.org.apache.flume.clients.log4jappender = DEBUG,out2
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/solr/collection1/conf/synonyms.txt:
--------------------------------------------------------------------------------
1 | # The ASF licenses this file to You under the Apache License, Version 2.0
2 | # (the "License"); you may not use this file except in compliance with
3 | # the License. You may obtain a copy of the License at
4 | #
5 | # http://www.apache.org/licenses/LICENSE-2.0
6 | #
7 | # Unless required by applicable law or agreed to in writing, software
8 | # distributed under the License is distributed on an "AS IS" BASIS,
9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | # See the License for the specific language governing permissions and
11 | # limitations under the License.
12 |
13 | #-----------------------------------------------------------------------
14 | #some test synonym mappings unlikely to appear in real input text
15 | aaafoo => aaabar
16 | bbbfoo => bbbfoo bbbbar
17 | cccfoo => cccbar cccbaz
18 | fooaaa,baraaa,bazaaa
19 |
20 | # Some synonym groups specific to this example
21 | GB,gib,gigabyte,gigabytes
22 | MB,mib,megabyte,megabytes
23 | Television, Televisions, TV, TVs
24 | #notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
25 | #after us won't split it into two words.
26 |
27 | # Synonym mappings can be used for spelling correction too
28 | pixima => pixma
29 |
30 |
--------------------------------------------------------------------------------
/flume-ng-sdk/src/main/thrift/flume.thrift:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | namespace java org.apache.flume.thrift
21 |
22 | struct ThriftFlumeEvent {
23 | 1: required map headers,
24 | 2: required binary body,
25 | }
26 |
27 | enum Status {
28 | OK,
29 | FAILED,
30 | ERROR,
31 | UNKNOWN
32 | }
33 |
34 | service ThriftSourceProtocol {
35 | Status append(1: ThriftFlumeEvent event),
36 | Status appendBatch(1: list events),
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/conf/flume-env.sh.template:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # If this file is placed at FLUME_CONF_DIR/flume-env.sh, it will be sourced
18 | # during Flume startup.
19 |
20 | # Enviroment variables can be set here.
21 |
22 | #JAVA_HOME=/usr/lib/jvm/java-6-sun
23 |
24 | # Give Flume more memory and pre-allocate, enable remote monitoring via JMX
25 | #JAVA_OPTS="-Xms100m -Xmx200m -Dcom.sun.management.jmxremote"
26 |
27 | # Note that the Flume conf directory is always included in the classpath.
28 | #FLUME_CLASSPATH=""
29 |
30 |
--------------------------------------------------------------------------------
/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/InitialContextFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.source.jms;
19 |
20 | import java.util.Properties;
21 |
22 | import javax.naming.InitialContext;
23 | import javax.naming.NamingException;
24 |
25 |
26 | public class InitialContextFactory {
27 |
28 | public InitialContext create(Properties properties) throws NamingException {
29 | return new InitialContext(properties);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/formatter/output/TextDelimitedOutputFormatter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.formatter.output;
21 |
22 | import org.apache.flume.Event;
23 |
24 | @Deprecated
25 | public class TextDelimitedOutputFormatter implements EventFormatter {
26 |
27 | @Override
28 | public byte[] format(Event event) {
29 | String body = event.getBody().length > 0 ? new String(event.getBody()) : "";
30 |
31 | return (body + "\n").getBytes();
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Pair.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file;
20 |
21 | class Pair {
22 |
23 | private final L left;
24 | private final R right;
25 | Pair(L l, R r) {
26 | left = l;
27 | right = r;
28 | }
29 | L getLeft() {
30 | return left;
31 | }
32 | R getRight() {
33 | return right;
34 | }
35 | static Pair of(L left, R right) {
36 | return new Pair(left, right);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file.encryption;
20 |
21 | import java.security.Key;
22 |
23 | import org.apache.flume.Context;
24 |
25 | public abstract class KeyProvider {
26 |
27 | /**
28 | * Returns a non-null Key
29 | */
30 | public abstract Key getKey(String alias);
31 |
32 | public interface Builder {
33 | public abstract KeyProvider build(Context context);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-jdbc-sink/src/main/java/org/apache/flume/sink/jdbc/HeaderParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.sink.jdbc;
20 |
21 | /**
22 | * A subclass of parameter used to identify parameters that read from a header
23 | * (and not the body).
24 | */
25 | public abstract class HeaderParameter extends Parameter {
26 |
27 | protected String header;
28 |
29 | public HeaderParameter(final int id, final String header) {
30 | super(id);
31 | this.header = header;
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/flume-ng-doc/site.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 | org.apache.maven.skins
21 | maven-fluido-skin
22 | 1.0
23 |
24 |
25 |
26 |
27 |
28 |
29 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/flume-ng-legacy-sources/flume-avro-source/src/main/avro/flumeCompatibility.avdl:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | /* Avro protocol for Flume 0.9.x compatibility */
21 | @namespace("com.cloudera.flume.handlers.avro")
22 | protocol FlumeOGEventAvroServer{
23 | enum Priority { FATAL, ERROR, WARN,
24 | INFO, DEBUG, TRACE}
25 |
26 | record AvroFlumeOGEvent {
27 | long timestamp;
28 | Priority priority;
29 | bytes body;
30 | long nanos;
31 | string host;
32 | map fields;
33 | }
34 |
35 | void append( AvroFlumeOGEvent evt ) ;
36 | }
--------------------------------------------------------------------------------
/flume-ng-sdk/src/main/java/org/apache/flume/FlumeException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume;
19 |
20 | /**
21 | * Base class of all flume exceptions.
22 | */
23 | public class FlumeException extends RuntimeException {
24 |
25 | private static final long serialVersionUID = 1L;
26 |
27 | public FlumeException(String msg) {
28 | super(msg);
29 | }
30 |
31 | public FlumeException(String msg, Throwable th) {
32 | super(msg, th);
33 | }
34 |
35 | public FlumeException(Throwable th) {
36 | super(th);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/NoopRecordException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file;
20 |
21 | public class NoopRecordException extends Exception {
22 | private static final long serialVersionUID = -7394180633208889738L;
23 |
24 | public NoopRecordException() {
25 | super();
26 | }
27 |
28 | public NoopRecordException(String msg) {
29 | super(msg);
30 | }
31 |
32 | public NoopRecordException(String msg, Throwable th) {
33 | super(msg, th);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/CorruptEventException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file;
20 |
21 |
22 | public class CorruptEventException extends Exception {
23 |
24 | private static final long serialVersionUID = -2986946303540798416L;
25 | public CorruptEventException() {
26 | super();
27 | }
28 |
29 | public CorruptEventException(String msg) {
30 | super(msg);
31 | }
32 |
33 | public CorruptEventException(String msg, Throwable th) {
34 | super(msg, th);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestWriteOrderOracle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file;
20 |
21 | import junit.framework.Assert;
22 |
23 | import org.junit.Test;
24 |
25 | public class TestWriteOrderOracle {
26 |
27 |
28 | @Test
29 | public void testSetSeed() {
30 | long current = WriteOrderOracle.next();
31 | current += Integer.MAX_VALUE;
32 | WriteOrderOracle.setSeed(current);
33 | Assert.assertTrue(WriteOrderOracle.next() > System.currentTimeMillis());
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/Constants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume;
20 |
21 | public final class Constants {
22 |
23 | /**
24 | * Disables the fail-fast startup behavior. This would be used in the
25 | * scenario where the agent is expected to start, but the config
26 | * file be populated at a later point in time.
27 | */
28 | public static final String SYSPROP_CALLED_FROM_SERVICE
29 | = "flume.called.from.service";
30 |
31 | private Constants() {
32 | // disable explicit object creation
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/solr/collection1/conf/lang/stopwords_en.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | # a couple of test stopwords to test that the words are really being
17 | # configured from this file:
18 | stopworda
19 | stopwordb
20 |
21 | # Standard english stop words taken from Lucene's StopAnalyzer
22 | a
23 | an
24 | and
25 | are
26 | as
27 | at
28 | be
29 | but
30 | by
31 | for
32 | if
33 | in
34 | into
35 | is
36 | it
37 | no
38 | not
39 | of
40 | on
41 | or
42 | such
43 | that
44 | the
45 | their
46 | then
47 | there
48 | these
49 | they
50 | this
51 | to
52 | was
53 | will
54 | with
55 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/NamedComponent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume;
20 |
21 | import org.apache.flume.annotations.InterfaceAudience;
22 | import org.apache.flume.annotations.InterfaceStability;
23 |
24 | /**
25 | * Enables a component to be tagged with a name so that it can be referred
26 | * to uniquely within the configuration system.
27 | */
28 | @InterfaceAudience.Public
29 | @InterfaceStability.Stable
30 | public interface NamedComponent {
31 |
32 | public void setName(String name);
33 |
34 | public String getName();
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestTransactionIDOracle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file;
20 |
21 | import junit.framework.Assert;
22 |
23 | import org.junit.Test;
24 |
25 | public class TestTransactionIDOracle {
26 |
27 |
28 | @Test
29 | public void testSetSeed() {
30 | long current = TransactionIDOracle.next();
31 | current += Integer.MAX_VALUE;
32 | TransactionIDOracle.setSeed(current);
33 | Assert.assertTrue(TransactionIDOracle.next() > System.currentTimeMillis());
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/tools/PlatformDetect.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.tools;
19 |
20 | /**
21 | * Utilities for platform & operating system detection
22 | */
23 | public class PlatformDetect {
24 |
25 | /**
26 | * Detects whether we are running under Microsoft Windows.
27 | * @return true if and only if we are running on a Windows system.
28 | */
29 | public static boolean isWindows() {
30 | String os = System.getProperty("os.name");
31 | boolean isWin = (os.toLowerCase().indexOf("win") >= 0);
32 | return isWin;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/java/org/apache/flume/sink/solr/morphline/TestEnvironment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.flume.sink.solr.morphline;
18 |
19 | import java.net.UnknownHostException;
20 |
21 | import org.junit.Test;
22 |
23 | import com.cloudera.cdk.morphline.solr.EnvironmentTest;
24 |
25 | /** Print and verify some info about the environment in which the unit tests are running */
26 | public class TestEnvironment extends EnvironmentTest {
27 |
28 | @Test
29 | public void testEnvironment() throws UnknownHostException {
30 | super.testEnvironment();
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileRetryableIOException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file;
20 |
21 | import java.io.IOException;
22 |
23 | public class LogFileRetryableIOException extends IOException {
24 | private static final long serialVersionUID = -2747112999806160431L;
25 | public LogFileRetryableIOException() {
26 | super();
27 | }
28 | public LogFileRetryableIOException(String msg) {
29 | super(msg);
30 | }
31 | public LogFileRetryableIOException(String msg, Throwable t) {
32 | super(msg, t);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.instrumentation;
20 |
21 | import org.apache.flume.conf.Configurable;
22 |
23 | /**
24 | * Interface that any monitoring service should implement. If the monitor
25 | * service is to be started up when Flume starts, it should implement this
26 | * and the class name should be passed in during startup, with any additional
27 | * context it requires.
28 | */
29 | public interface MonitorService extends Configurable {
30 |
31 | public void start();
32 |
33 | public void stop();
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/CipherProviderType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file.encryption;
20 |
21 |
22 | public enum CipherProviderType {
23 | AESCTRNOPADDING(AESCTRNoPaddingProvider.class),
24 | OTHER(null);
25 |
26 | private final Class extends CipherProvider> providerClass;
27 |
28 | CipherProviderType(Class extends CipherProvider> providerClass) {
29 | this.providerClass = providerClass;
30 | }
31 |
32 | public Class extends CipherProvider> getProviderClass() {
33 | return providerClass;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.lifecycle;
21 |
22 | public class LifecycleException extends Exception {
23 |
24 | private static final long serialVersionUID = 4689000562519155240L;
25 |
26 | public LifecycleException() {
27 | super();
28 | }
29 |
30 | public LifecycleException(String message) {
31 | super(message);
32 | }
33 |
34 | public LifecycleException(String message, Throwable t) {
35 | super(message, t);
36 | }
37 |
38 | public LifecycleException(Throwable t) {
39 | super(t);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/tools/GetJavaProperty.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.tools;
19 |
20 | /**
21 | * A generic way for querying Java properties.
22 | */
23 | public class GetJavaProperty {
24 | public static void main(String args[]) {
25 | if (args.length == 0) {
26 | for (Object prop : System.getProperties().keySet()) {
27 | System.out.println(prop + "=" + System.getProperty((String)prop, ""));
28 | }
29 | } else {
30 | for (String prop : args) {
31 | System.out.println(prop + "=" + System.getProperty(prop, ""));
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/flume-ng-configuration/src/main/java/org/apache/flume/conf/ConfigurationException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.conf;
20 |
21 | import org.apache.flume.FlumeException;
22 |
23 | public class ConfigurationException extends FlumeException {
24 |
25 | /**
26 | *
27 | */
28 | private static final long serialVersionUID = 1L;
29 |
30 | public ConfigurationException(String arg0) {
31 | super(arg0);
32 | }
33 |
34 | public ConfigurationException(Throwable arg0) {
35 | super(arg0);
36 | }
37 |
38 | public ConfigurationException(String arg0, Throwable arg1) {
39 | super(arg0, arg1);
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/encryption/KeyProviderType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file.encryption;
20 |
21 |
22 | public enum KeyProviderType {
23 | JCEKSFILE(JCEFileKeyProvider.Builder.class),
24 | OTHER(null);
25 |
26 | private final Class extends KeyProvider.Builder> keyProviderClass;
27 |
28 | KeyProviderType(Class extends KeyProvider.Builder> keyStoreProviderClass) {
29 | this.keyProviderClass = keyStoreProviderClass;
30 | }
31 |
32 | public Class extends KeyProvider.Builder> getBuilderClass() {
33 | return keyProviderClass;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/solr/collection1/conf/lang/stopwords_th.txt:
--------------------------------------------------------------------------------
1 | # Thai stopwords from:
2 | # "Opinion Detection in Thai Political News Columns
3 | # Based on Subjectivity Analysis"
4 | # Khampol Sukhum, Supot Nitsuwat, and Choochart Haruechaiyasak
5 | ไว้
6 | ไม่
7 | ไป
8 | ได้
9 | ให้
10 | ใน
11 | โดย
12 | แห่ง
13 | แล้ว
14 | และ
15 | แรก
16 | แบบ
17 | แต่
18 | เอง
19 | เห็น
20 | เลย
21 | เริ่ม
22 | เรา
23 | เมื่อ
24 | เพื่อ
25 | เพราะ
26 | เป็นการ
27 | เป็น
28 | เปิดเผย
29 | เปิด
30 | เนื่องจาก
31 | เดียวกัน
32 | เดียว
33 | เช่น
34 | เฉพาะ
35 | เคย
36 | เข้า
37 | เขา
38 | อีก
39 | อาจ
40 | อะไร
41 | ออก
42 | อย่าง
43 | อยู่
44 | อยาก
45 | หาก
46 | หลาย
47 | หลังจาก
48 | หลัง
49 | หรือ
50 | หนึ่ง
51 | ส่วน
52 | ส่ง
53 | สุด
54 | สําหรับ
55 | ว่า
56 | วัน
57 | ลง
58 | ร่วม
59 | ราย
60 | รับ
61 | ระหว่าง
62 | รวม
63 | ยัง
64 | มี
65 | มาก
66 | มา
67 | พร้อม
68 | พบ
69 | ผ่าน
70 | ผล
71 | บาง
72 | น่า
73 | นี้
74 | นํา
75 | นั้น
76 | นัก
77 | นอกจาก
78 | ทุก
79 | ที่สุด
80 | ที่
81 | ทําให้
82 | ทํา
83 | ทาง
84 | ทั้งนี้
85 | ทั้ง
86 | ถ้า
87 | ถูก
88 | ถึง
89 | ต้อง
90 | ต่างๆ
91 | ต่าง
92 | ต่อ
93 | ตาม
94 | ตั้งแต่
95 | ตั้ง
96 | ด้าน
97 | ด้วย
98 | ดัง
99 | ซึ่ง
100 | ช่วง
101 | จึง
102 | จาก
103 | จัด
104 | จะ
105 | คือ
106 | ความ
107 | ครั้ง
108 | คง
109 | ขึ้น
110 | ของ
111 | ขอ
112 | ขณะ
113 | ก่อน
114 | ก็
115 | การ
116 | กับ
117 | กัน
118 | กว่า
119 | กล่าว
120 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/JdbcChannelException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.channel.jdbc;
19 |
20 | import org.apache.flume.ChannelException;
21 |
22 | public class JdbcChannelException extends ChannelException {
23 |
24 | private static final long serialVersionUID = -5566109526732929679L;
25 |
26 | public JdbcChannelException(String message) {
27 | super(message);
28 | }
29 |
30 | public JdbcChannelException(String message, Exception cause) {
31 | super(message, cause);
32 | }
33 |
34 | public JdbcChannelException(Exception cause) {
35 | super(cause);
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-jdbc-sink/src/test/java/org/apache/flume/sink/jdbc/TestJDBCSinkCreation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.sink.jdbc;
20 |
21 | import org.apache.flume.Sink;
22 | import org.apache.flume.SinkFactory;
23 | import org.apache.flume.sink.DefaultSinkFactory;
24 | import static org.junit.Assert.*;
25 | import org.junit.Test;
26 |
27 | public class TestJDBCSinkCreation {
28 |
29 | @Test
30 | public void testSinkCreation() {
31 | final SinkFactory factory = new DefaultSinkFactory();
32 | final Sink sink = factory.create("s", "jdbc");
33 | assertNotNull(sink);
34 | assertTrue(sink instanceof PreparedStatementJDBCSink);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-core/src/test/java/org/apache/flume/interceptor/TestRegexExtractorInterceptorPassThroughSerializer.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.interceptor;
19 |
20 | import junit.framework.Assert;
21 |
22 | import org.apache.flume.Context;
23 | import org.junit.Test;
24 |
25 | public class TestRegexExtractorInterceptorPassThroughSerializer {
26 |
27 | @Test
28 | public void shouldReturnSameValue() {
29 | RegexExtractorInterceptorPassThroughSerializer fixture = new RegexExtractorInterceptorPassThroughSerializer();
30 | fixture.configure(new Context());
31 | String input = "testing (1,2,3,4)";
32 | Assert.assertEquals(input, fixture.serialize(input));
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/flume-ng-configuration/src/test/java/org/apache/flume/conf/source/TestSourceConfiguration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with this
4 | * work for additional information regarding copyright ownership. The ASF
5 | * licenses this file to you under the Apache License, Version 2.0 (the
6 | * "License"); you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 | * License for the specific language governing permissions and limitations under
15 | * the License.
16 | */
17 | package org.apache.flume.conf.source;
18 |
19 | import org.apache.flume.Context;
20 | import org.apache.flume.conf.ConfigurationException;
21 | import org.junit.Test;
22 |
23 | public class TestSourceConfiguration {
24 |
25 | /**
26 | * Test fails without FLUME-1847
27 | */
28 | @Test(expected = ConfigurationException.class)
29 | public void testFLUME1847() throws Exception {
30 | Context context = new Context();
31 | context.put("type", "something");
32 | SourceConfiguration sourceConfig = new SourceConfiguration("src");
33 | sourceConfig.configure(context);
34 |
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/serialization/PositionTracker.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.serialization;
19 |
20 | import org.apache.flume.annotations.InterfaceAudience;
21 | import org.apache.flume.annotations.InterfaceStability;
22 |
23 | import java.io.Closeable;
24 | import java.io.IOException;
25 |
26 | /**
27 | * Defines an interface for tracking the offset position in a target file.
28 | */
29 | @InterfaceAudience.Private
30 | @InterfaceStability.Evolving
31 | public interface PositionTracker extends Closeable {
32 | void storePosition(long position) throws IOException;
33 | long getPosition();
34 | String getTarget();
35 | void close() throws IOException;
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/BadCheckpointException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.flume.channel.file;
20 |
21 | import org.apache.flume.FlumeException;
22 |
23 | /**
24 | * Exception thrown when the checkpoint directory contains invalid data,
25 | * probably due to the channel stopping while the checkpoint was written.
26 | */
27 | public class BadCheckpointException extends FlumeException{
28 | private static final long serialVersionUID = -5038652693746472779L;
29 |
30 | public BadCheckpointException(String msg) {
31 | super(msg);
32 | }
33 | public BadCheckpointException(String msg, Throwable t) {
34 | super(msg, t);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/instrumentation/MonitoringType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.instrumentation;
21 |
22 | /**
23 | * Enum for Monitoring types.
24 | */
25 | public enum MonitoringType {
26 | OTHER(null),
27 | GANGLIA(org.apache.flume.instrumentation.GangliaServer.class),
28 | HTTP(org.apache.flume.instrumentation.http.HTTPMetricsServer.class);
29 |
30 | private Class extends MonitorService> monitoringClass;
31 |
32 | private MonitoringType(Class extends MonitorService> klass) {
33 | this.monitoringClass = klass;
34 | }
35 |
36 | public Class extends MonitorService> getMonitorClass(){
37 | return this.monitoringClass;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/serialization/RemoteMarkable.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.serialization;
19 |
20 | import java.io.IOException;
21 |
22 | /** Allows for calling mark() without a seek() */
23 | public interface RemoteMarkable {
24 |
25 | /**
26 | * Indicate that the specified position should be returned to in the case of
27 | * {@link Resettable#reset()} being called.
28 | * @throws java.io.IOException
29 | */
30 | void markPosition(long position) throws IOException;
31 |
32 | /**
33 | * Return the saved mark position without moving the mark pointer.
34 | * @throws IOException
35 | */
36 | long getMarkPosition() throws IOException;
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/SequenceFileSerializerType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.sink.hdfs;
20 |
21 | public enum SequenceFileSerializerType {
22 | Writable(HDFSWritableSerializer.Builder.class),
23 | Text(HDFSTextSerializer.Builder.class),
24 | Other(null);
25 |
26 | private final Class extends SequenceFileSerializer.Builder> builderClass;
27 |
28 | SequenceFileSerializerType(
29 | Class extends SequenceFileSerializer.Builder> builderClass) {
30 | this.builderClass = builderClass;
31 | }
32 |
33 | public Class extends SequenceFileSerializer.Builder> getBuilderClass() {
34 | return builderClass;
35 | }
36 |
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/WriteOrderOracle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file;
20 |
21 | import java.util.concurrent.atomic.AtomicLong;
22 |
23 | public final class WriteOrderOracle {
24 |
25 | private WriteOrderOracle() {}
26 | private static final AtomicLong WRITER_ORDERER =
27 | new AtomicLong(System.currentTimeMillis());
28 |
29 | public static void setSeed(long highest) {
30 | long previous;
31 | while(highest > (previous = WRITER_ORDERER.get())) {
32 | WRITER_ORDERER.compareAndSet(previous, highest);
33 | }
34 | }
35 | public static long next() {
36 | return WRITER_ORDERER.incrementAndGet();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptorSerializer.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.interceptor;
19 |
20 | import org.apache.flume.conf.Configurable;
21 | import org.apache.flume.conf.ConfigurableComponent;
22 |
23 | /**
24 | * Serializer for serializing groups matched by the
25 | * {@link RegexExtractorInterceptor}
26 | */
27 | public interface RegexExtractorInterceptorSerializer extends Configurable,
28 | ConfigurableComponent {
29 |
30 | /**
31 | * @param value
32 | * The value extracted by the {@link RegexExtractorInterceptor}
33 | * @return The serialized version of the specified value
34 | */
35 | String serialize(String value);
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/solr/collection1/conf/elevate.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/TransactionIDOracle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.channel.file;
20 |
21 | import java.util.concurrent.atomic.AtomicLong;
22 |
23 | public final class TransactionIDOracle {
24 |
25 | private TransactionIDOracle() {}
26 | private static final AtomicLong TRANSACTION_ID =
27 | new AtomicLong(System.currentTimeMillis());
28 |
29 | public static void setSeed(long highest) {
30 | long previous;
31 | while(highest > (previous = TRANSACTION_ID.get())) {
32 | TRANSACTION_ID.compareAndSet(previous, highest);
33 | }
34 | }
35 | public static long next() {
36 | return TRANSACTION_ID.incrementAndGet();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/flume-tools/src/main/java/org/apache/flume/tools/FlumeToolType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.tools;
20 |
21 | public enum FlumeToolType {
22 | FCINTEGRITYTOOL(FileChannelIntegrityTool.class);
23 |
24 | private final Class extends FlumeTool> klass;
25 | private FlumeToolType(Class extends FlumeTool> klass) {
26 | this.klass = klass;
27 | }
28 |
29 | public Class extends FlumeTool> getClassInstance() {
30 | return this.klass;
31 | }
32 |
33 | public static String getNames() {
34 | StringBuilder builder = new StringBuilder();
35 | for(FlumeToolType type: values()) {
36 | builder.append(type.name().toLowerCase() + "\n");
37 | }
38 | return builder.toString();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/flume-ng-clients/pom.xml:
--------------------------------------------------------------------------------
1 |
17 |
19 | 4.0.0
20 |
21 | flume-parent
22 | org.apache.flume
23 | 1.5.0-SNAPSHOT
24 | ..
25 |
26 | flume-ng-clients
27 | pom
28 | Flume NG Clients
29 | All flume NG clients will come under this module
30 |
31 | flume-ng-log4jappender
32 |
33 |
34 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/test-documents/sample-statuses-20120906-141433.avsc:
--------------------------------------------------------------------------------
1 | {
2 | "type" : "record",
3 | "name" : "Doc",
4 | "doc" : "adoc",
5 | "fields" : [ {
6 | "name" : "id",
7 | "type" : "string"
8 | }, {
9 | "name" : "user_friends_count",
10 | "type" : [ "int", "null" ]
11 | }, {
12 | "name" : "user_location",
13 | "type" : [ "string", "null" ]
14 | }, {
15 | "name" : "user_description",
16 | "type" : [ "string", "null" ]
17 | }, {
18 | "name" : "user_statuses_count",
19 | "type" : [ "int", "null" ]
20 | }, {
21 | "name" : "user_followers_count",
22 | "type" : [ "int", "null" ]
23 | }, {
24 | "name" : "user_name",
25 | "type" : [ "string", "null" ]
26 | }, {
27 | "name" : "user_screen_name",
28 | "type" : [ "string", "null" ]
29 | }, {
30 | "name" : "created_at",
31 | "type" : [ "string", "null" ]
32 | }, {
33 | "name" : "text",
34 | "type" : [ "string", "null" ]
35 | }, {
36 | "name" : "retweet_count",
37 | "type" : [ "int", "null" ]
38 | }, {
39 | "name" : "retweeted",
40 | "type" : [ "boolean", "null" ]
41 | }, {
42 | "name" : "in_reply_to_user_id",
43 | "type" : [ "long", "null" ]
44 | }, {
45 | "name" : "source",
46 | "type" : [ "string", "null" ]
47 | }, {
48 | "name" : "in_reply_to_status_id",
49 | "type" : [ "long", "null" ]
50 | }, {
51 | "name" : "media_url_https",
52 | "type" : [ "string", "null" ]
53 | }, {
54 | "name" : "expanded_url",
55 | "type" : [ "string", "null" ]
56 | } ]
57 | }
58 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-jdbc-sink/src/main/java/org/apache/flume/sink/jdbc/ByteArrayBodyParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.sink.jdbc;
20 |
21 | import java.sql.PreparedStatement;
22 |
23 | import org.apache.flume.Event;
24 |
25 | /**
26 | * A parameter that puts the byte array header into a the database as.
27 | */
28 | public class ByteArrayBodyParameter extends BodyParameter {
29 |
30 | public ByteArrayBodyParameter(final int id) {
31 | super(id);
32 | }
33 |
34 | @Override
35 | public void setValue(final PreparedStatement ps, final Event e)
36 | throws Exception {
37 | // Null bodies are not valid. They are always at least arrays of zero
38 | // length.
39 | ps.setBytes(id, e.getBody());
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/source/AbstractEventDrivenSource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.source;
20 |
21 | import org.apache.flume.EventDrivenSource;
22 | import org.apache.flume.annotations.InterfaceAudience;
23 | import org.apache.flume.annotations.InterfaceStability;
24 |
25 | /**
26 | * Base class which ensures sub-classes will inherit all the properties
27 | * of BasicSourceSemantics. Adds no additional functionality and is provided
28 | * for completeness sake.
29 | */
30 | @InterfaceAudience.Public
31 | @InterfaceStability.Evolving
32 | public abstract class AbstractEventDrivenSource extends BasicSourceSemantics
33 | implements EventDrivenSource {
34 |
35 | public AbstractEventDrivenSource() {
36 | super();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/interceptor/RegexExtractorInterceptorPassThroughSerializer.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.interceptor;
19 |
20 | import org.apache.flume.Context;
21 | import org.apache.flume.conf.ComponentConfiguration;
22 |
23 | /**
24 | * Serializer that simply returns the passed in value
25 | */
26 | public class RegexExtractorInterceptorPassThroughSerializer implements
27 | RegexExtractorInterceptorSerializer {
28 |
29 | @Override
30 | public String serialize(String value) {
31 | return value;
32 | }
33 |
34 | @Override
35 | public void configure(Context context) {
36 | // NO-OP...
37 | }
38 |
39 | @Override
40 | public void configure(ComponentConfiguration conf) {
41 | // NO-OP...
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/flume-ng-sources/flume-twitter-source/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | log4j.rootLogger=WARN, A1
18 |
19 | log4j.logger.org.apache.flume.sink=INFO
20 | #log4j.logger.org.apache.flume.sink.solr=DEBUG
21 | log4j.logger.org.apache.solr=INFO
22 | #log4j.logger.org.apache.solr.hadoop=DEBUG
23 | log4j.logger.org.apache.solr.morphline=DEBUG
24 | log4j.logger.org.apache.solr.update.processor.LogUpdateProcessor=WARN
25 | log4j.logger.org.apache.solr.core.SolrCore=WARN
26 | log4j.logger.org.apache.solr.search.SolrIndexSearcher=ERROR
27 |
28 | # A1 is set to be a ConsoleAppender.
29 | log4j.appender.A1=org.apache.log4j.ConsoleAppender
30 |
31 | # A1 uses PatternLayout.
32 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout
33 | log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
34 |
--------------------------------------------------------------------------------
/flume-ng-channels/flume-jdbc-channel/src/main/java/org/apache/flume/channel/jdbc/impl/JdbcTransactionFactory.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.channel.jdbc.impl;
19 |
20 | import javax.sql.DataSource;
21 |
22 | public class JdbcTransactionFactory extends ThreadLocal {
23 |
24 | private final DataSource dataSource;
25 | private final JdbcChannelProviderImpl providerImpl;
26 |
27 | protected JdbcTransactionFactory(DataSource dataSource,
28 | JdbcChannelProviderImpl providerImpl) {
29 | super();
30 | this.dataSource = dataSource;
31 | this.providerImpl = providerImpl;
32 | }
33 |
34 | @Override
35 | protected JdbcTransactionImpl initialValue() {
36 | return new JdbcTransactionImpl(dataSource, this, providerImpl);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/flume-ng-sdk/src/main/java/org/apache/flume/EventDeliveryException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume;
21 |
22 | /**
23 | * An event delivery exception is raised whenever an {@link Event} fails to
24 | * reach at least one of its intended (next-hop) destinations.
25 | */
26 | public class EventDeliveryException extends Exception {
27 |
28 | private static final long serialVersionUID = 1102327497549834945L;
29 |
30 | public EventDeliveryException() {
31 | super();
32 | }
33 |
34 | public EventDeliveryException(String message) {
35 | super(message);
36 | }
37 |
38 | public EventDeliveryException(String message, Throwable t) {
39 | super(message, t);
40 | }
41 |
42 | public EventDeliveryException(Throwable t) {
43 | super(t);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/serialization/AvroEventSerializerConfigurationConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.serialization;
20 |
21 | import org.apache.avro.file.CodecFactory;
22 |
23 | public class AvroEventSerializerConfigurationConstants {
24 |
25 | /**
26 | * Avro sync interval, in approximate bytes
27 | */
28 | public static final String SYNC_INTERVAL_BYTES = "syncIntervalBytes";
29 | public static final int DEFAULT_SYNC_INTERVAL_BYTES = 2048000; // 2MB
30 |
31 | /**
32 | * Avro compression codec. For supported codecs, see Avro's
33 | * {@link CodecFactory} class.
34 | */
35 | public static final String COMPRESSION_CODEC = "compressionCodec";
36 | public static final String DEFAULT_COMPRESSION_CODEC = "null"; // no codec
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/source/http/HTTPBadRequestException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.source.http;
19 |
20 | import org.apache.flume.FlumeException;
21 |
22 | /**
23 | *
24 | * Exception thrown by an HTTP Handler if the request was not parsed correctly
25 | * into an event because the request was not in the expected format.
26 | *
27 | */
28 | public class HTTPBadRequestException extends FlumeException {
29 |
30 | private static final long serialVersionUID = -3540764742069390951L;
31 |
32 | public HTTPBadRequestException(String msg) {
33 | super(msg);
34 | }
35 |
36 | public HTTPBadRequestException(String msg, Throwable th) {
37 | super(msg, th);
38 | }
39 |
40 | public HTTPBadRequestException(Throwable th) {
41 | super(th);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/source/NetcatSourceConfigurationConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.source;
20 |
21 | public class NetcatSourceConfigurationConstants {
22 |
23 | /**
24 | * Hostname to bind to.
25 | */
26 | public static final String CONFIG_HOSTNAME = "bind";
27 |
28 | /**
29 | * Port to bind to.
30 | */
31 | public static final String CONFIG_PORT = "port";
32 |
33 |
34 | /**
35 | * Ack every event received with an "OK" back to the sender
36 | */
37 | public static final String CONFIG_ACKEVENT = "ack-every-event";
38 |
39 | /**
40 | * Maximum line length per event.
41 | */
42 | public static final String CONFIG_MAX_LINE_LENGTH = "max-line-length";
43 | public static final int DEFAULT_MAX_LINE_LENGTH = 512;
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/test-documents/rsstest.rss:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 | TestChannel
21 | http://test.channel.com/
22 | Sample RSS File for Junit test
23 | en-us
24 |
25 |
26 | Home Page of Chris Mattmann
27 | http://www-scf.usc.edu/~mattmann/
28 | Chris Mattmann's home page
29 |
30 |
31 | Awesome Open Source Search Engine
32 | http://www.nutch.org/
33 | Yup, that's what it is
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/test-documents/testDITA.dita:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Apache Tika
5 | Apache Tika - a content analysis toolkit.
6 |
7 | Apache Software Foundation
8 |
9 |
10 | Apache Software Foundation
11 |
12 |
13 |
14 | Metadata
15 |
16 | Tika
17 | Content
18 |
19 |
20 | Apache Tika
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
The Apache Tika toolkit detects and extracts metadata and structured text content from various documents using existing parser libraries. You can find the latest release on the download page. See the Getting Started guide for instructions on how to start using Tika.
30 |
31 |
Tika is a project of the Apache Software Foundation, and was formerly a subproject of Apache Lucene.
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/custom-mimetypes.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | log4j.rootLogger=WARN, A1
18 |
19 | log4j.logger.org.apache.flume.sink=INFO
20 | #log4j.logger.org.apache.flume.sink.solr=DEBUG
21 | log4j.logger.org.apache.solr=INFO
22 | #log4j.logger.org.apache.solr.hadoop=DEBUG
23 | log4j.logger.com.cloudera.cdk.morphline=DEBUG
24 | log4j.logger.org.apache.solr.morphline=DEBUG
25 | log4j.logger.org.apache.solr.update.processor.LogUpdateProcessor=WARN
26 | log4j.logger.org.apache.solr.core.SolrCore=WARN
27 | log4j.logger.org.apache.solr.search.SolrIndexSearcher=ERROR
28 |
29 | # A1 is set to be a ConsoleAppender.
30 | log4j.appender.A1=org.apache.log4j.ConsoleAppender
31 |
32 | # A1 uses PatternLayout.
33 | log4j.appender.A1.layout=org.apache.log4j.PatternLayout
34 | log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
35 |
--------------------------------------------------------------------------------
/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.source.jms;
19 |
20 | import javax.jms.ConnectionFactory;
21 |
22 | import com.google.common.base.Optional;
23 |
24 |
25 | public class JMSMessageConsumerFactory {
26 |
27 | JMSMessageConsumer create(ConnectionFactory connectionFactory,
28 | String destinationName, JMSDestinationType destinationType,
29 | String messageSelector, int batchSize, long pollTimeout,
30 | JMSMessageConverter messageConverter, Optional userName,
31 | Optional password) {
32 | return new JMSMessageConsumer(connectionFactory, destinationName,
33 | destinationType, messageSelector, batchSize, pollTimeout,
34 | messageConverter, userName, password);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/serialization/EventDeserializerType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.serialization;
20 |
21 | import org.apache.flume.annotations.InterfaceAudience;
22 | import org.apache.flume.annotations.InterfaceStability;
23 |
24 | @InterfaceAudience.Private
25 | @InterfaceStability.Unstable
26 | public enum EventDeserializerType {
27 | LINE(LineDeserializer.Builder.class),
28 | AVRO(AvroEventDeserializer.Builder.class),
29 | OTHER(null);
30 |
31 | private final Class extends EventDeserializer.Builder> builderClass;
32 |
33 | EventDeserializerType(Class extends EventDeserializer.Builder> builderClass) {
34 | this.builderClass = builderClass;
35 | }
36 |
37 | public Class extends EventDeserializer.Builder> getBuilderClass() {
38 | return builderClass;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/flume-ng-core/src/test/java/org/apache/flume/serialization/TransientPositionTracker.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.serialization;
19 |
20 | import java.io.IOException;
21 |
22 | public class TransientPositionTracker implements PositionTracker {
23 |
24 | private final String target;
25 | private long position = 0;
26 |
27 | public TransientPositionTracker(String target) {
28 | this.target = target;
29 | }
30 |
31 | @Override
32 | public void storePosition(long position) throws IOException {
33 | this.position = position;
34 | }
35 |
36 | @Override
37 | public long getPosition() {
38 | return position;
39 | }
40 |
41 | @Override
42 | public String getTarget() {
43 | return target;
44 | }
45 |
46 | @Override
47 | public void close() throws IOException {
48 | // no-op
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/ChannelException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume;
19 |
20 | /**
21 | *
A channel exception is raised whenever a channel operation fails.
22 | */
23 | public class ChannelException extends RuntimeException {
24 |
25 | private static final long serialVersionUID = 1L;
26 |
27 | /**
28 | * @param message the exception message
29 | */
30 | public ChannelException(String message) {
31 | super(message);
32 | }
33 |
34 | /**
35 | * @param ex the causal exception
36 | */
37 | public ChannelException(Throwable ex) {
38 | super(ex);
39 | }
40 |
41 | /**
42 | * @param message the exception message
43 | * @param ex the causal exception
44 | */
45 | public ChannelException(String message, Throwable ex) {
46 | super(message, ex);
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-ng-morphline-solr-sink/src/test/resources/solr/collection1/conf/lang/stopwords_ar.txt:
--------------------------------------------------------------------------------
1 | # This file was created by Jacques Savoy and is distributed under the BSD license.
2 | # See http://members.unine.ch/jacques.savoy/clef/index.html.
3 | # Also see http://www.opensource.org/licenses/bsd-license.html
4 | # Cleaned on October 11, 2009 (not normalized, so use before normalization)
5 | # This means that when modifying this list, you might need to add some
6 | # redundant entries, for example containing forms with both أ and ا
7 | من
8 | ومن
9 | منها
10 | منه
11 | في
12 | وفي
13 | فيها
14 | فيه
15 | و
16 | ف
17 | ثم
18 | او
19 | أو
20 | ب
21 | بها
22 | به
23 | ا
24 | أ
25 | اى
26 | اي
27 | أي
28 | أى
29 | لا
30 | ولا
31 | الا
32 | ألا
33 | إلا
34 | لكن
35 | ما
36 | وما
37 | كما
38 | فما
39 | عن
40 | مع
41 | اذا
42 | إذا
43 | ان
44 | أن
45 | إن
46 | انها
47 | أنها
48 | إنها
49 | انه
50 | أنه
51 | إنه
52 | بان
53 | بأن
54 | فان
55 | فأن
56 | وان
57 | وأن
58 | وإن
59 | التى
60 | التي
61 | الذى
62 | الذي
63 | الذين
64 | الى
65 | الي
66 | إلى
67 | إلي
68 | على
69 | عليها
70 | عليه
71 | اما
72 | أما
73 | إما
74 | ايضا
75 | أيضا
76 | كل
77 | وكل
78 | لم
79 | ولم
80 | لن
81 | ولن
82 | هى
83 | هي
84 | هو
85 | وهى
86 | وهي
87 | وهو
88 | فهى
89 | فهي
90 | فهو
91 | انت
92 | أنت
93 | لك
94 | لها
95 | له
96 | هذه
97 | هذا
98 | تلك
99 | ذلك
100 | هناك
101 | كانت
102 | كان
103 | يكون
104 | تكون
105 | وكانت
106 | وكان
107 | غير
108 | بعض
109 | قد
110 | نحو
111 | بين
112 | بينما
113 | منذ
114 | ضمن
115 | حيث
116 | الان
117 | الآن
118 | خلال
119 | بعد
120 | قبل
121 | حتى
122 | عند
123 | عندما
124 | لدى
125 | جميع
126 |
--------------------------------------------------------------------------------
/flume-ng-core/src/test/java/org/apache/flume/event/TestEventHelper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.event;
20 |
21 | import org.junit.Assert;
22 | import org.junit.Test;
23 |
24 | public class TestEventHelper {
25 |
26 | @Test
27 | public void testPrintable() {
28 | SimpleEvent event = new SimpleEvent();
29 | event.setBody("Some text".getBytes());
30 | String eventDump = EventHelper.dumpEvent(event);
31 | System.out.println(eventDump);
32 | Assert.assertTrue(eventDump, eventDump.contains("Some text"));
33 | }
34 |
35 | @Test
36 | public void testNonPrintable() {
37 | SimpleEvent event = new SimpleEvent();
38 | byte[] body = new byte[5];
39 | event.setBody(body);
40 | String eventDump = EventHelper.dumpEvent(event);
41 | Assert.assertTrue(eventDump, eventDump.contains("....."));
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/flume-ng-core/src/test/java/org/apache/flume/instrumentation/util/JMXTestUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.instrumentation.util;
20 |
21 | import java.util.Map;
22 | import org.junit.Assert;
23 |
24 | /**
25 | *
26 | */
27 | public class JMXTestUtils {
28 |
29 | public static void checkChannelCounterParams(Map attrs) {
30 | Assert.assertNotNull(attrs.get("StartTime"));
31 | Assert.assertNotNull(attrs.get("StopTime"));
32 | Assert.assertTrue(Long.parseLong(attrs.get("ChannelSize")) != 0);
33 | Assert.assertTrue(Long.parseLong(attrs.get("EventPutAttemptCount")) == 2);
34 | Assert.assertTrue(Long.parseLong(attrs.get("EventTakeAttemptCount")) == 1);
35 | Assert.assertTrue(Long.parseLong(attrs.get("EventPutSuccessCount")) == 2);
36 | Assert.assertTrue(Long.parseLong(attrs.get("EventTakeSuccessCount")) == 1);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/source/http/HTTPSourceConfigurationConstants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.flume.source.http;
20 |
21 | /**
22 | *
23 | */
24 | public class HTTPSourceConfigurationConstants {
25 |
26 | public static final String CONFIG_PORT = "port";
27 | public static final String CONFIG_HANDLER = "handler";
28 | public static final String CONFIG_HANDLER_PREFIX =
29 | CONFIG_HANDLER + ".";
30 | public static final String CONFIG_BIND = "bind";
31 |
32 | public static final String DEFAULT_BIND = "0.0.0.0";
33 |
34 | public static final String DEFAULT_HANDLER =
35 | "org.apache.flume.source.http.JSONHandler";
36 |
37 | public static final String SSL_KEYSTORE = "keystore";
38 | public static final String SSL_KEYSTORE_PASSWORD = "keystorePassword";
39 | public static final String SSL_ENABLED = "enableSSL";
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/RELEASE-NOTES:
--------------------------------------------------------------------------------
1 | Apache Flume 1.4.0
2 |
3 | CONTENTS
4 | 1. What is Apache Flume
5 | 2. Status of this release
6 | 3. Major changes in this Release
7 | 4. How to Get Involved
8 | 5. How to Report Issues
9 |
10 | 1. What is Apache Flume
11 | Flume is a distributed, reliable, and available service for
12 | efficiently collecting, aggregating, and moving large amounts of event
13 | data. It has a simple and flexible architecture based on streaming
14 | data flows. It is robust and fault tolerant with tunable reliability
15 | mechanisms and many failover and recovery mechanisms. Flume uses a
16 | simple, extensible data model that allows for online analytic
17 | application.
18 |
19 | 2. Status of this release
20 | Apache Flume 1.4.0 is the fourth release of Flume as an Apache top-level project
21 | (TLP). Apache Flume 1.4.0 is production-ready software.
22 |
23 | 3. Major changes in this Release
24 | For a detailed list of changes, please see the CHANGELOG file included
25 | in this distribution.
26 |
27 | Apache Flume versions 1.0.0 and greater represent a major refactoring of the
28 | Flume codebase and are not backwards compatible with the 0.9.x series of Flume
29 | releases. However, the developers of Flume strive to maintain backwards
30 | compatibility within the 1.x codeline.
31 |
32 | 4. How to Get Involved
33 | The Apache Flume project really needs and appreciates any contributions,
34 | including documentation help, source code and feedback. If you are interested
35 | in contributing, please visit:
36 | https://cwiki.apache.org/confluence/display/FLUME/How+to+Contribute
37 |
38 | 5. How to Report Issues
39 | The Apache Flume project uses JIRA for issue tracking. Please report any issues
40 | you find at http://issues.apache.org/jira/browse/FLUME
41 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/client/avro/ReliableEventReader.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package org.apache.flume.client.avro;
19 |
20 | import org.apache.flume.annotations.InterfaceAudience;
21 | import org.apache.flume.annotations.InterfaceStability;
22 |
23 | import java.io.IOException;
24 |
25 | /**
26 | * A reliable event reader.
27 | * Clients must call commit() after each read operation, otherwise the
28 | * implementation must reset its internal buffers and return the same events
29 | * as it did previously.
30 | */
31 | @InterfaceAudience.Private
32 | @InterfaceStability.Evolving
33 | public interface ReliableEventReader extends EventReader {
34 |
35 | /**
36 | * Indicate to the implementation that the previously-returned events have
37 | * been successfully processed and committed.
38 | * @throws IOException
39 | */
40 | public void commit() throws IOException;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/serialization/EventSerializerType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.serialization;
20 |
21 | import org.apache.flume.annotations.InterfaceAudience;
22 | import org.apache.flume.annotations.InterfaceStability;
23 |
24 | @InterfaceAudience.Private
25 | @InterfaceStability.Unstable
26 | public enum EventSerializerType {
27 | TEXT(BodyTextEventSerializer.Builder.class),
28 | HEADER_AND_TEXT(HeaderAndBodyTextEventSerializer.Builder.class),
29 | AVRO_EVENT(FlumeEventAvroEventSerializer.Builder.class),
30 | OTHER(null);
31 |
32 | private final Class extends EventSerializer.Builder> builderClass;
33 |
34 | EventSerializerType(Class extends EventSerializer.Builder> builderClass) {
35 | this.builderClass = builderClass;
36 | }
37 |
38 | public Class extends EventSerializer.Builder> getBuilderClass() {
39 | return builderClass;
40 | }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/flume-ng-sinks/flume-hdfs-sink/src/test/java/org/apache/flume/sink/hdfs/HDFSBadDataStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 |
20 | package org.apache.flume.sink.hdfs;
21 |
22 | import java.io.IOException;
23 | import org.apache.flume.Event;
24 |
25 | public class HDFSBadDataStream extends HDFSDataStream {
26 | public class HDFSBadSeqWriter extends HDFSSequenceFile {
27 | @Override
28 | public void append(Event e) throws IOException {
29 |
30 | if (e.getHeaders().containsKey("fault")) {
31 | throw new IOException("Injected fault");
32 | } else if (e.getHeaders().containsKey("slow")) {
33 | long waitTime = Long.parseLong(e.getHeaders().get("slow"));
34 | try {
35 | Thread.sleep(waitTime);
36 | } catch (InterruptedException eT) {
37 | throw new IOException("append interrupted", eT);
38 | }
39 | }
40 | super.append(e);
41 | }
42 |
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/interceptor/InterceptorType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | package org.apache.flume.interceptor;
20 |
21 | public enum InterceptorType {
22 |
23 | TIMESTAMP(org.apache.flume.interceptor.TimestampInterceptor.Builder.class),
24 | HOST(org.apache.flume.interceptor.HostInterceptor.Builder.class),
25 | STATIC(org.apache.flume.interceptor.StaticInterceptor.Builder.class),
26 | REGEX_FILTER(
27 | org.apache.flume.interceptor.RegexFilteringInterceptor.Builder.class),
28 | REGEX_EXTRACTOR(org.apache.flume.interceptor.RegexExtractorInterceptor.Builder.class);
29 |
30 | private final Class extends Interceptor.Builder> builderClass;
31 |
32 | private InterceptorType(Class extends Interceptor.Builder> builderClass) {
33 | this.builderClass = builderClass;
34 | }
35 |
36 | public Class extends Interceptor.Builder> getBuilderClass() {
37 | return builderClass;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/instrumentation/ChannelCounterMBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.instrumentation;
20 |
21 | /**
22 | * This interface represents a channel counter mbean. Any class implementing
23 | * this interface must sub-class
24 | * {@linkplain org.apache.flume.instrumentation.MonitoredCounterGroup}. This
25 | * interface might change between minor releases. Please see
26 | * {@linkplain org.apache.flume.instrumentation.ChannelCounter} class.
27 | */
28 | public interface ChannelCounterMBean {
29 |
30 | long getChannelSize();
31 |
32 | long getEventPutAttemptCount();
33 |
34 | long getEventTakeAttemptCount();
35 |
36 | long getEventPutSuccessCount();
37 |
38 | long getEventTakeSuccessCount();
39 |
40 | long getStartTime();
41 |
42 | long getStopTime();
43 |
44 | long getChannelCapacity();
45 |
46 | String getType();
47 |
48 | double getChannelFillPercentage();
49 | }
50 |
--------------------------------------------------------------------------------
/flume-ng-core/src/main/java/org/apache/flume/instrumentation/SourceCounterMBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | package org.apache.flume.instrumentation;
20 | /**
21 | * This interface represents a source counter mbean. Any class implementing
22 | * this interface must sub-class
23 | * {@linkplain org.apache.flume.instrumentation.MonitoredCounterGroup}. This
24 | * interface might change between minor releases. Please see
25 | * {@linkplain org.apache.flume.instrumentation.SourceCounter} class.
26 | */
27 | public interface SourceCounterMBean {
28 |
29 | long getEventReceivedCount();
30 |
31 | long getEventAcceptedCount();
32 |
33 | long getAppendReceivedCount();
34 |
35 | long getAppendAcceptedCount();
36 |
37 | long getAppendBatchReceivedCount();
38 |
39 | long getAppendBatchAcceptedCount();
40 |
41 | long getStartTime();
42 |
43 | long getStopTime();
44 |
45 | String getType();
46 |
47 | long getOpenConnectionCount();
48 | }
49 |
--------------------------------------------------------------------------------