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