jihoonson commented on a change in pull request #6431: Add Kinesis Indexing 
Service to core Druid
URL: https://github.com/apache/incubator-druid/pull/6431#discussion_r242355713
 
 

 ##########
 File path: 
extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorIOConfig.java
 ##########
 @@ -0,0 +1,172 @@
+/*
+ * 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.druid.indexing.kinesis.supervisor;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.base.Preconditions;
+import org.apache.druid.indexing.kinesis.KinesisIndexTaskIOConfig;
+import org.apache.druid.indexing.kinesis.KinesisRegion;
+import 
org.apache.druid.indexing.seekablestream.supervisor.SeekableStreamSupervisorIOConfig;
+import org.joda.time.Period;
+
+public class KinesisSupervisorIOConfig extends SeekableStreamSupervisorIOConfig
+{
+  private final String endpoint;
+
+  // In determining a suitable value for recordsPerFetch:
+  //   - Each data record can be up to 1 MB in size
+  //   - Each shard can read up to 2 MB per second
+  //   - The maximum size of data that GetRecords can return is 10 MB. If a 
call returns this amount of data,
+  //     subsequent calls made within the next 5 seconds throw 
ProvisionedThroughputExceededException.
+  //
+  // If there is insufficient provisioned throughput on the shard, subsequent 
calls made within the next 1 second
+  // throw ProvisionedThroughputExceededException. Note that GetRecords won't 
return any data when it throws an
+  // exception. For this reason, we recommend that you wait one second between 
calls to GetRecords; however, it's
+  // possible that the application will get exceptions for longer than 1 
second.
+  private final Integer recordsPerFetch;
+  private final Integer fetchDelayMillis;
+
+  private final String awsAccessKeyId;
+  private final String awsSecretAccessKey;
 
 Review comment:
   I understand sometimes we need a different credential for kinesis from s3, 
but the secretKey in ioConfig doesn't look safe to me. The key is also in 
`KinesisIndexTaskIOConfig` which is printed in the task log. How about adding 
new configurations similar to s3 credential configuration (e.g., 
`druid.s3.secretKey`) but for kinesis credentials which are applied to all 
kinesis supervisors and index tasks?
   
   I also think that maybe it makes sense to use Druid's s3 credential by 
default if kinesis credential is not provided. What do you think?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to