APEXMALHAR-2480 Fixed checkstyle and Log4j Properties.
Project: http://git-wip-us.apache.org/repos/asf/apex-malhar/repo Commit: http://git-wip-us.apache.org/repos/asf/apex-malhar/commit/c830f5e4 Tree: http://git-wip-us.apache.org/repos/asf/apex-malhar/tree/c830f5e4 Diff: http://git-wip-us.apache.org/repos/asf/apex-malhar/diff/c830f5e4 Branch: refs/heads/master Commit: c830f5e4f5390e93202b3b99f5a0398cb44592b0 Parents: b25a128 Author: Apex Dev <[email protected]> Authored: Wed Apr 19 14:07:32 2017 -0700 Committer: Lakshmi Prasanna Velineni <[email protected]> Committed: Fri May 19 08:57:24 2017 -0700 ---------------------------------------------------------------------- examples/s3/pom.xml | 20 ++++++++++++++++ examples/s3/src/assemble/appPackage.xml | 20 ++++++++++++++++ .../apex/examples/s3Output/Application.java | 20 +++++++++++++++- .../s3ToHdfsSync/S3ToHDFSSyncApplication.java | 20 +++++++++++++++- .../examples/s3TupleOutput/Application.java | 22 ++++++++++++++++-- .../resources/META-INF/properties-s3Output.xml | 20 ++++++++++++++++ .../META-INF/properties-s3ToHdfsSync.xml | 20 ++++++++++++++++ .../META-INF/properties-s3TupleOutput.xml | 24 ++++++++++++++++++-- examples/s3/src/test/resources/log4j.properties | 21 +++++++++++++++++ 9 files changed, 181 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/pom.xml ---------------------------------------------------------------------- diff --git a/examples/s3/pom.xml b/examples/s3/pom.xml index 07327c5..ce10aff 100644 --- a/examples/s3/pom.xml +++ b/examples/s3/pom.xml @@ -1,4 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/src/assemble/appPackage.xml ---------------------------------------------------------------------- diff --git a/examples/s3/src/assemble/appPackage.xml b/examples/s3/src/assemble/appPackage.xml index 7ad071c..a870807 100644 --- a/examples/s3/src/assemble/appPackage.xml +++ b/examples/s3/src/assemble/appPackage.xml @@ -1,3 +1,23 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/src/main/java/org/apache/apex/examples/s3Output/Application.java ---------------------------------------------------------------------- diff --git a/examples/s3/src/main/java/org/apache/apex/examples/s3Output/Application.java b/examples/s3/src/main/java/org/apache/apex/examples/s3Output/Application.java index 574a17f..a8d2574 100644 --- a/examples/s3/src/main/java/org/apache/apex/examples/s3Output/Application.java +++ b/examples/s3/src/main/java/org/apache/apex/examples/s3Output/Application.java @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.apex.examples.s3Output; import org.apache.apex.malhar.lib.fs.s3.S3OutputModule; @@ -11,7 +29,7 @@ import com.datatorrent.lib.io.fs.FSInputModule; /** * Application illustrating copy files from HDFS to S3 bucket. */ -@ApplicationAnnotation(name="HDFSToS3App") +@ApplicationAnnotation(name = "HDFSToS3App") public class Application implements StreamingApplication { @Override http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/src/main/java/org/apache/apex/examples/s3ToHdfsSync/S3ToHDFSSyncApplication.java ---------------------------------------------------------------------- diff --git a/examples/s3/src/main/java/org/apache/apex/examples/s3ToHdfsSync/S3ToHDFSSyncApplication.java b/examples/s3/src/main/java/org/apache/apex/examples/s3ToHdfsSync/S3ToHDFSSyncApplication.java index 9e64c59..472341c 100644 --- a/examples/s3/src/main/java/org/apache/apex/examples/s3ToHdfsSync/S3ToHDFSSyncApplication.java +++ b/examples/s3/src/main/java/org/apache/apex/examples/s3ToHdfsSync/S3ToHDFSSyncApplication.java @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.apex.examples.s3ToHdfsSync; import org.apache.hadoop.conf.Configuration; @@ -12,7 +30,7 @@ import com.datatorrent.lib.io.fs.S3InputModule; /** * Simple application illustrating file copy from S3. S3 Input */ -@ApplicationAnnotation(name="S3-to-HDFS-Sync") +@ApplicationAnnotation(name = "S3-to-HDFS-Sync") public class S3ToHDFSSyncApplication implements StreamingApplication { http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/src/main/java/org/apache/apex/examples/s3TupleOutput/Application.java ---------------------------------------------------------------------- diff --git a/examples/s3/src/main/java/org/apache/apex/examples/s3TupleOutput/Application.java b/examples/s3/src/main/java/org/apache/apex/examples/s3TupleOutput/Application.java index d5855a0..cba776c 100644 --- a/examples/s3/src/main/java/org/apache/apex/examples/s3TupleOutput/Application.java +++ b/examples/s3/src/main/java/org/apache/apex/examples/s3TupleOutput/Application.java @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.apache.apex.examples.s3TupleOutput; import org.apache.apex.malhar.lib.fs.FSRecordReaderModule; @@ -11,7 +29,7 @@ import com.datatorrent.api.annotation.ApplicationAnnotation; /** * Simple application illustrating file copy from S3 */ -@ApplicationAnnotation(name="s3-output-line") +@ApplicationAnnotation(name = "s3-output-line") public class Application implements StreamingApplication { @@ -20,7 +38,7 @@ public class Application implements StreamingApplication FSRecordReaderModule recordReader = dag.addModule("lineInput", FSRecordReaderModule.class); S3BytesOutputModule s3StringOutputModule = dag.addModule("s3TupleOutput", S3BytesOutputModule.class); dag.addStream("data", recordReader.records, s3StringOutputModule.input); - + } } http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/src/main/resources/META-INF/properties-s3Output.xml ---------------------------------------------------------------------- diff --git a/examples/s3/src/main/resources/META-INF/properties-s3Output.xml b/examples/s3/src/main/resources/META-INF/properties-s3Output.xml index 5a07e12..27af41f 100644 --- a/examples/s3/src/main/resources/META-INF/properties-s3Output.xml +++ b/examples/s3/src/main/resources/META-INF/properties-s3Output.xml @@ -1,4 +1,24 @@ <?xml version="1.0"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> <configuration> <property> <name>dt.operator.HDFSInputModule.prop.files</name> http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/src/main/resources/META-INF/properties-s3ToHdfsSync.xml ---------------------------------------------------------------------- diff --git a/examples/s3/src/main/resources/META-INF/properties-s3ToHdfsSync.xml b/examples/s3/src/main/resources/META-INF/properties-s3ToHdfsSync.xml index 6d8ecea..8bc4c0b 100644 --- a/examples/s3/src/main/resources/META-INF/properties-s3ToHdfsSync.xml +++ b/examples/s3/src/main/resources/META-INF/properties-s3ToHdfsSync.xml @@ -1,4 +1,24 @@ <?xml version="1.0"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> <configuration> <property> <name>dt.operator.S3InputModule.prop.files</name> http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/src/main/resources/META-INF/properties-s3TupleOutput.xml ---------------------------------------------------------------------- diff --git a/examples/s3/src/main/resources/META-INF/properties-s3TupleOutput.xml b/examples/s3/src/main/resources/META-INF/properties-s3TupleOutput.xml index c1365bd..15435e7 100644 --- a/examples/s3/src/main/resources/META-INF/properties-s3TupleOutput.xml +++ b/examples/s3/src/main/resources/META-INF/properties-s3TupleOutput.xml @@ -1,4 +1,24 @@ <?xml version="1.0"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> <configuration> <property> <name>dt.operator.lineInput.prop.files</name> @@ -40,8 +60,8 @@ <name>dt.operator.lineInput.prop.minReaders</name> <value>1</value> </property> - <property> + <!--property> <name>dt.loggers.level</name> <value>org.apache.apex.malhar.lib.fs.s3.*:DEBUG,org.apache.apex.*:DEBUG,com.datatorrent.stram.plan.physical.*:DEBUG,com.datatorrent.lib.*:DEBUG</value> - </property> + </property--> </configuration> http://git-wip-us.apache.org/repos/asf/apex-malhar/blob/c830f5e4/examples/s3/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/examples/s3/src/test/resources/log4j.properties b/examples/s3/src/test/resources/log4j.properties index 3bfcdc5..19a53bc 100644 --- a/examples/s3/src/test/resources/log4j.properties +++ b/examples/s3/src/test/resources/log4j.properties @@ -1,8 +1,29 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + log4j.rootLogger=DEBUG,CONSOLE log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} %M - %m%n +log4j.appender.CONSOLE.threshold=${test.log.console.threshold} +test.log.console.threshold=INFO log4j.appender.RFA=org.apache.log4j.RollingFileAppender log4j.appender.RFA.layout=org.apache.log4j.PatternLayout
