Repository: samza Updated Branches: refs/heads/master 57fea260a -> e58e3cadc
SAMZA-1632: KinesisConfig: Making getProxyHost and getProxyPort APIs protected Author: Aditya Toomula <atoom...@linkedin.com> Reviewers: Jagadish<jagad...@apache.org> Closes #457 from atoomula/kconfig Project: http://git-wip-us.apache.org/repos/asf/samza/repo Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/e58e3cad Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/e58e3cad Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/e58e3cad Branch: refs/heads/master Commit: e58e3cadc53d85cd35357eff0f9bd1806b16349e Parents: 57fea26 Author: Aditya Toomula <atoom...@linkedin.com> Authored: Thu Mar 29 15:57:58 2018 -0700 Committer: Jagadish <jvenkatra...@linkedin.com> Committed: Thu Mar 29 15:57:58 2018 -0700 ---------------------------------------------------------------------- .../samza/system/kinesis/KinesisConfig.java | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/samza/blob/e58e3cad/samza-aws/src/main/java/org/apache/samza/system/kinesis/KinesisConfig.java ---------------------------------------------------------------------- diff --git a/samza-aws/src/main/java/org/apache/samza/system/kinesis/KinesisConfig.java b/samza-aws/src/main/java/org/apache/samza/system/kinesis/KinesisConfig.java index a4ac40d..d11096f 100644 --- a/samza-aws/src/main/java/org/apache/samza/system/kinesis/KinesisConfig.java +++ b/samza-aws/src/main/java/org/apache/samza/system/kinesis/KinesisConfig.java @@ -142,24 +142,12 @@ public class KinesisConfig extends MapConfig { } /** - * @param system name of the system - * @return {@link ClientConfiguration} which has options controlling how the client connects to kinesis - * (eg: proxy settings, retry counts, etc) - */ - ClientConfiguration getAWSClientConfig(String system) { - ClientConfiguration awsClientConfig = new ClientConfiguration(); - setAwsClientConfigs(subset(String.format(CONFIG_AWS_CLIENT_CONFIG, system)), awsClientConfig); - awsClientConfig.getApacheHttpClientConfig().setSslSocketFactory(getSSLSocketFactory(system)); - return awsClientConfig; - } - - /** * Get the proxy host as a system level config. This is needed when * users need to go through a proxy for the Kinesis connections. * @param system name of the system * @return proxy host name or empty string if not defined */ - String getProxyHost(String system) { + protected String getProxyHost(String system) { return get(String.format(CONFIG_PROXY_HOST, system), DEFAULT_CONFIG_PROXY_HOST); } @@ -169,11 +157,23 @@ public class KinesisConfig extends MapConfig { * @param system name of the system * @return proxy port number or 0 if not defined */ - int getProxyPort(String system) { + protected int getProxyPort(String system) { return getInt(String.format(CONFIG_PROXY_PORT, system), DEFAULT_CONFIG_PROXY_PORT); } /** + * @param system name of the system + * @return {@link ClientConfiguration} which has options controlling how the client connects to kinesis + * (eg: proxy settings, retry counts, etc) + */ + ClientConfiguration getAWSClientConfig(String system) { + ClientConfiguration awsClientConfig = new ClientConfiguration(); + setAwsClientConfigs(subset(String.format(CONFIG_AWS_CLIENT_CONFIG, system)), awsClientConfig); + awsClientConfig.getApacheHttpClientConfig().setSslSocketFactory(getSSLSocketFactory(system)); + return awsClientConfig; + } + + /** * Get the Kinesis region for the system stream * @param system name of the system * @param stream name of the stream