[ 
https://issues.apache.org/jira/browse/AMBARI-24833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683385#comment-16683385
 ] 

ASF GitHub Bot commented on AMBARI-24833:
-----------------------------------------

kasakrisz commented on a change in pull request #19: AMBARI-24833. Re-implement 
S3/HDFS outputs as global cloud outputs
URL: https://github.com/apache/ambari-logsearch/pull/19#discussion_r232536877
 
 

 ##########
 File path: 
ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/output/S3OutputConfig.java
 ##########
 @@ -0,0 +1,329 @@
+/*
+ * 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.ambari.logfeeder.conf.output;
+
+import com.amazonaws.services.s3.model.CannedAccessControlList;
+import org.apache.ambari.logfeeder.common.LogFeederConstants;
+import org.apache.ambari.logsearch.config.api.LogSearchPropertyDescription;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+
+import javax.inject.Inject;
+
+@Configuration
+public class S3OutputConfig implements CloudStorageOutputConfig {
+
+  private final BucketConfig bucketConfig;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_ENDPOINT,
+    description = "Amazon S3 endpoint.",
+    examples = {"https://s3.amazonaws.com"},
+    defaultValue = LogFeederConstants.S3_ENDPOINT_DEFAULT,
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_ENDPOINT + ":" + 
LogFeederConstants.S3_ENDPOINT_DEFAULT +"}")
+  private String endpoint;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_SECRET_KEY,
+    description = "Amazon S3 secret key.",
+    examples = {"MySecretKey"},
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_SECRET_KEY + ":}")
+  private String secretKey;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_ACCESS_KEY,
+    description = "Amazon S3 secret access key.",
+    examples = {"MySecretAccessKey"},
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_ACCESS_KEY + ":}")
+  private String accessKey;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_SECRET_KEY_FILE,
+    description = "Amazon S3 secret key file (that contains only the key).",
+    examples = {"/my/path/secret_key"},
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_ACCESS_KEY + ":}")
+  private String secretKeyFileLocation;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_ACCESS_KEY_FILE,
+    description = "Amazon S3 secret access key file (that contains only the 
key).",
+    examples = {"/my/path/access_key"},
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_ACCESS_KEY_FILE + ":}")
+  private String accessKeyFileLocation;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_USE_FILE,
+    description = "Enable to get Amazon S3 secret/access keys from files.",
+    examples = {"true"},
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_USE_FILE + ":false}")
+  private boolean useFileSecrets;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_USE_HADOOP_CREDENTIAL_PROVIDER,
+    description = "Enable to get Amazon S3 secret/access keys from Hadoop 
credential store API.",
+    examples = {"true"},
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_USE_HADOOP_CREDENTIAL_PROVIDER + 
":false}")
+  private boolean useHadoopCredentialStorage;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_HADOOP_CREDENTIAL_SECRET_REF,
+    description = "Amazon S3 secret access key reference in Hadoop credential 
store..",
+    examples = {"logfeeder.s3.secret.key"},
+    defaultValue = "logfeeder.s3.secret.key",
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_HADOOP_CREDENTIAL_SECRET_REF + 
":logfeeder.s3.secret.key}")
+  private String secretKeyHadoopCredentialReference;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_HADOOP_CREDENTIAL_ACCESS_REF,
+    description = "Amazon S3 access key reference in Hadoop credential 
store..",
+    examples = {"logfeeder.s3.access.key"},
+    defaultValue = "logfeeder.s3.access.key",
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_HADOOP_CREDENTIAL_ACCESS_REF + 
":logfeeder.s3.access.key}")
+  private String accessKeyHadoopCredentialReference;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_REGION,
+    description = "Amazon S3 region.",
+    examples = {"us-east-2"},
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_REGION + ":us-east-2}")
+  private String region;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_BUCKET,
+    description = "Amazon S3 bucket.",
+    examples = {"logs"},
+    defaultValue = "logfeeder",
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${"+ LogFeederConstants.S3_BUCKET + ":logfeeder}")
+  private String bucket;
+
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.S3_OBJECT_ACL,
+    description = "Amazon S3 bucket.",
 
 Review comment:
   The previous property (`bucket`) has the same description: `Amazon S3 
bucket.`. Should this be something else like `Amazon S3 Object ACL`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Log Feeder: send logs to cloud storage (gcs/s3 etc.)
> ----------------------------------------------------
>
>                 Key: AMBARI-24833
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24833
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-logsearch
>    Affects Versions: 2.7.0
>            Reporter: Olivér Szabó
>            Assignee: Olivér Szabó
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.8.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to