2 * ===============================LICENSE_START======================================
\r
4 * ================================================================================
\r
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============================LICENSE_END===========================================
\r
21 package org.openecomp.dcae.apod.analytics.cdap.plugins.domain.config.dmaap;
\r
23 import co.cask.cdap.api.annotation.Description;
\r
24 import co.cask.cdap.api.annotation.Macro;
\r
25 import com.google.common.base.Objects;
\r
27 import javax.annotation.Nullable;
\r
30 * DMaaP MR Publisher Config
\r
32 * @author Rajiv Singla . Creation Date: 1/17/2017.
\r
34 public class DMaaPMRSinkPluginConfig extends BaseDMaaPMRPluginConfig {
\r
36 private static final long serialVersionUID = 1L;
\r
38 @Description("Column name of input schema which contains the message that needs to be written to DMaaP MR Topic")
\r
40 protected String messageColumnName;
\r
42 @Description("DMaaP MR Publisher Max Batch Size. Defaults to no Batch")
\r
45 protected Integer maxBatchSize;
\r
47 @Description("DMaaP MR Publisher Recovery Queue Size. Default to 1000K messages which can be buffered in memory " +
\r
48 "in case DMaaP MR Publisher is temporarily unavailable")
\r
51 protected Integer maxRecoveryQueueSize;
\r
53 // Required No Arg constructor
\r
54 public DMaaPMRSinkPluginConfig() {
\r
55 this(null, null, null, null);
\r
58 public DMaaPMRSinkPluginConfig(String referenceName, String hostName, String topicName, String messageColumnName) {
\r
59 super(referenceName, hostName, topicName);
\r
60 this.messageColumnName = messageColumnName;
\r
64 * Column name of incoming Schema field that contains the message that needs to published to DMaaP MR Topic
\r
66 * @return Column name of incoming schema which contains message that needs to published to DMaaP MR Topic
\r
68 public String getMessageColumnName() {
\r
69 return messageColumnName;
\r
73 * DMaaP MR Publisher Max Batch Size.
\r
75 * @return DMaaP MR Publisher Max Batch Size
\r
78 public Integer getMaxBatchSize() {
\r
79 return maxBatchSize;
\r
83 * DMaaP MR Publisher Max Recovery Queue Size
\r
85 * @return DMaaP MR Publisher Max Recovery Queue Size
\r
88 public Integer getMaxRecoveryQueueSize() {
\r
89 return maxRecoveryQueueSize;
\r
93 public String toString() {
\r
94 return Objects.toStringHelper(this)
\r
95 .add("super", super.toString())
\r
96 .add("messageColumnName", messageColumnName)
\r
97 .add("maxBatchSize", maxBatchSize)
\r
98 .add("maxRecoveryQueueSize", maxRecoveryQueueSize)
\r