Skip to content

Commit 2cc6a4a

Browse files
Added missing javadocs and fixed pom.xml versions
Changed copyright to 2020
1 parent c83e384 commit 2cc6a4a

File tree

14 files changed

+51
-27
lines changed

14 files changed

+51
-27
lines changed

database-commons/src/test/java/io/cdap/plugin/db/batch/DatabasePluginTestBase.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ public static Schema getSchemaWithInvalidTypeMapping(String columnName, Schema.T
5757
);
5858
}
5959

60+
protected static void assertRuntimeFailure(ApplicationId appId, ETLBatchConfig etlConfig,
61+
ArtifactSummary datapipelineArtifact, String failureMessage, int runCount)
62+
throws Exception {
63+
AppRequest<ETLBatchConfig> appRequest = new AppRequest<>(datapipelineArtifact, etlConfig);
64+
ApplicationManager appManager = deployApplication(appId, appRequest);
65+
final WorkflowManager workflowManager = appManager.getWorkflowManager(SmartWorkflow.NAME);
66+
workflowManager.start();
67+
workflowManager.waitForRuns(ProgramRunStatus.FAILED, runCount, 3, TimeUnit.MINUTES);
68+
}
69+
6070
protected static void assertDeploymentFailure(ApplicationId appId, ETLBatchConfig etlConfig,
6171
ArtifactSummary datapipelineArtifact, String failureMessage)
6272
throws Exception {

mariadb-plugin/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Copyright © 2019 CDAP
3+
Copyright © 2020 CDAP
44
55
Licensed under the Apache License, Version 2.0 (the "License"); you may not
66
use this file except in compliance with the License. You may obtain a copy of
@@ -20,12 +20,12 @@
2020
<parent>
2121
<artifactId>database-plugins</artifactId>
2222
<groupId>io.cdap.plugin</groupId>
23-
<version>1.3.0-SNAPSHOT</version>
23+
<version>1.4.0-SNAPSHOT</version>
2424
</parent>
2525

2626
<name>Maria DB plugin</name>
2727
<artifactId>mariadb-plugin</artifactId>
28-
<version>1.3.0-SNAPSHOT</version>
28+
<version>1.4.0-SNAPSHOT</version>
2929
<modelVersion>4.0.0</modelVersion>
3030

3131
<dependencies>

mariadb-plugin/src/main/java/io/cdap/plugin/mariadb/MariadbAction.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019 Cask Data, Inc.
2+
* Copyright © 2020 Cask Data, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -28,7 +28,7 @@
2828
import javax.annotation.Nullable;
2929

3030
/**
31-
* MariaDB action that runs MariaDB command
31+
* MariaDB action that runs MariaDB command.
3232
*/
3333
@Plugin(type = Action.PLUGIN_TYPE)
3434
@Name(MariadbConstants.PLUGIN_NAME)
@@ -37,13 +37,17 @@ public class MariadbAction extends AbstractDBAction {
3737

3838
private final MariadbActionConfig mariadbActionConfig;
3939

40+
/**
41+
* This is the constructor for MariadbAction.
42+
* @param mariadbActionConfig It takes Mariadb Action config object as the parameter.
43+
*/
4044
public MariadbAction(MariadbActionConfig mariadbActionConfig) {
4145
super(mariadbActionConfig, false);
4246
this.mariadbActionConfig = mariadbActionConfig;
4347
}
4448

4549
/**
46-
* MariaDB Action Config
50+
* MariaDB Action Config.
4751
*/
4852
public static class MariadbActionConfig extends DBSpecificQueryConfig {
4953

mariadb-plugin/src/main/java/io/cdap/plugin/mariadb/MariadbConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019 Cask Data, Inc.
2+
* Copyright © 2020 Cask Data, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -17,7 +17,7 @@
1717
package io.cdap.plugin.mariadb;
1818

1919
/**
20-
* MariaDB constants
20+
* MariaDB constants.
2121
*/
2222
public final class MariadbConstants {
2323
private MariadbConstants() {

mariadb-plugin/src/main/java/io/cdap/plugin/mariadb/MariadbPostAction.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019 Cask Data, Inc.
2+
* Copyright © 2020 Cask Data, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -28,7 +28,7 @@
2828
import javax.annotation.Nullable;
2929

3030
/**
31-
* Represents MariaDB post action
31+
* Represents MariaDB post action.
3232
*/
3333
@Plugin(type = PostAction.PLUGIN_TYPE)
3434
@Name(MariadbConstants.PLUGIN_NAME)
@@ -37,13 +37,17 @@ public class MariadbPostAction extends AbstractQueryAction {
3737

3838
private final MariadbQueryActionConfig mariadbQueryActionConfig;
3939

40+
/**
41+
* This is the constructor for MariadbPostAction.
42+
* @param mariadbQueryActionConfig It takes Mariadb query action config object as the parameter.
43+
*/
4044
public MariadbPostAction(MariadbQueryActionConfig mariadbQueryActionConfig) {
4145
super(mariadbQueryActionConfig, false);
4246
this.mariadbQueryActionConfig = mariadbQueryActionConfig;
4347
}
4448

4549
/**
46-
* MariaDB post action mariadbQueryActionConfig
50+
* MariaDB post action mariadbQueryActionConfig.
4751
*/
4852
public static class MariadbQueryActionConfig extends DBSpecificQueryActionConfig {
4953

mariadb-plugin/src/main/java/io/cdap/plugin/mariadb/MariadbSink.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019 Cask Data, Inc.
2+
* Copyright © 2020 Cask Data, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -23,12 +23,11 @@
2323
import io.cdap.plugin.db.batch.config.DBSpecificSinkConfig;
2424
import io.cdap.plugin.db.batch.sink.AbstractDBSink;
2525

26-
import java.util.List;
2726
import java.util.Map;
2827
import javax.annotation.Nullable;
2928

3029
/**
31-
* MariaDB Sink
30+
* MariaDB Sink.
3231
*/
3332
@Plugin(type = BatchSink.PLUGIN_TYPE)
3433
@Name(MariadbConstants.PLUGIN_NAME)
@@ -37,13 +36,17 @@ public class MariadbSink extends AbstractDBSink {
3736

3837
private final MariadbSinkConfig mariadbSinkConfig;
3938

39+
/**
40+
* This is the constructor for MariadbSink.
41+
* @param mariadbSinkConfig It takes Mariadb sink config object as the parameter.
42+
*/
4043
public MariadbSink(MariadbSinkConfig mariadbSinkConfig) {
4144
super(mariadbSinkConfig);
4245
this.mariadbSinkConfig = mariadbSinkConfig;
4346
}
4447

4548
/**
46-
* MariaDB Sink Config
49+
* MariaDB Sink Config.
4750
*/
4851
public static class MariadbSinkConfig extends DBSpecificSinkConfig {
4952

mariadb-plugin/src/main/java/io/cdap/plugin/mariadb/MariadbSource.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019 Cask Data, Inc.
2+
* Copyright © 2020 Cask Data, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -28,7 +28,7 @@
2828
import javax.annotation.Nullable;
2929

3030
/**
31-
* MariaDB source
31+
* MariaDB source.
3232
*/
3333
@Plugin(type = BatchSource.PLUGIN_TYPE)
3434
@Name(MariadbConstants.PLUGIN_NAME)
@@ -38,6 +38,10 @@ public class MariadbSource extends AbstractDBSource {
3838

3939
private final MariadbSourceConfig mariadbSourceConfig;
4040

41+
/**
42+
* This is the constructor for MariadbSource.
43+
* @param mariadbSourceConfig It takes Mariadb source config object as the parameter.
44+
*/
4145
public MariadbSource(MariadbSourceConfig mariadbSourceConfig) {
4246
super(mariadbSourceConfig);
4347
this.mariadbSourceConfig = mariadbSourceConfig;
@@ -50,7 +54,7 @@ protected String createConnectionString() {
5054
}
5155

5256
/**
53-
* MaraiDB source mariadbSourceConfig
57+
* MaraiDB source mariadbSourceConfig.
5458
*/
5559
public static class MariadbSourceConfig extends DBSpecificSourceConfig {
5660

mariadb-plugin/src/main/java/io/cdap/plugin/mariadb/MariadbUtil.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019 Cask Data, Inc.
2+
* Copyright © 2020 Cask Data, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -16,7 +16,6 @@
1616

1717
package io.cdap.plugin.mariadb;
1818

19-
import com.google.common.base.Strings;
2019
import com.google.common.collect.ImmutableList;
2120
import com.google.common.collect.ImmutableMap;
2221

@@ -25,7 +24,7 @@
2524
import javax.annotation.Nullable;
2625

2726
/**
28-
* MariaDB util methods
27+
* MariaDB util methods.
2928
*/
3029
public final class MariadbUtil {
3130
private MariadbUtil() {

mariadb-plugin/src/test/java/io/cdap/plugin/mariadb/MariadbActionTestRun.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019 Cask Data, Inc.
2+
* Copyright © 2020 Cask Data, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

mariadb-plugin/src/test/java/io/cdap/plugin/mariadb/MariadbPluginTestBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2019 Cask Data, Inc.
2+
* Copyright © 2020 Cask Data, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of

0 commit comments

Comments
 (0)