Skip to content
Permalink
Browse files
geode-dunit dependency added and naming changes
* Adding geode-dunit to run the tests.

* Adding the dunit folder to the gitignore

* adding the sink tests

* Fixing the sink test issue

* Renamed the package to org.apache

* Spotless and more apache renaming.

* Removed checked in
  • Loading branch information
nabarunnag committed Feb 19, 2020
1 parent 7d7a77d commit 792e30154439c68f82274bc54763c5f13ed9078d
Showing 40 changed files with 633 additions and 692 deletions.
@@ -234,4 +234,5 @@ dist/
nbdist/
.nb-gradle/

.idea/
.idea/
**/dunit
@@ -73,10 +73,11 @@ dependencies {
testCompile(group: 'org.apache.kafka', name: 'connect-runtime', version: '2.3.1')

testCompile(group: 'junit', name: 'junit', version: '4.12')
// testCompile("org.junit.jupiter:junit-jupiter-params:5.4.2")
testCompile('org.mockito:mockito-core:3.2.4')
testCompile('pl.pragmatists:JUnitParams:1.1.1')

testImplementation 'org.awaitility:awaitility:4.0.2'
testCompile(group: 'org.apache.geode', name: 'geode-dunit', version: '1.9.0')
testImplementation 'org.awaitility:awaitility:3.1.6'
}

shadowJar {
@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka;
package org.apache.geode.kafka;

import java.util.Arrays;
import java.util.Collection;
@@ -12,11 +12,11 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka;
package org.apache.geode.kafka;

import static org.geode.kafka.GeodeConnectorConfig.SECURITY_CLIENT_AUTH_INIT;
import static org.geode.kafka.GeodeConnectorConfig.SECURITY_PASSWORD;
import static org.geode.kafka.GeodeConnectorConfig.SECURITY_USER;
import static org.apache.geode.kafka.GeodeConnectorConfig.SECURITY_CLIENT_AUTH_INIT;
import static org.apache.geode.kafka.GeodeConnectorConfig.SECURITY_PASSWORD;
import static org.apache.geode.kafka.GeodeConnectorConfig.SECURITY_USER;

import java.util.List;

@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka;
package org.apache.geode.kafka;

public class LocatorHostPort {

@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.security;
package org.apache.geode.kafka.security;

import java.util.Properties;

@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.sink;
package org.apache.geode.kafka.sink;

import java.util.ArrayList;
import java.util.Collection;
@@ -12,9 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.sink;

import static org.geode.kafka.sink.GeodeSinkConnectorConfig.SINK_CONFIG_DEF;
package org.apache.geode.kafka.sink;

import java.util.ArrayList;
import java.util.HashMap;
@@ -24,7 +22,8 @@
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
import org.apache.kafka.connect.sink.SinkConnector;
import org.geode.kafka.GeodeConnectorConfig;

import org.apache.geode.kafka.GeodeConnectorConfig;

public class GeodeKafkaSink extends SinkConnector {
private Map<String, String> sharedProps;
@@ -62,7 +61,7 @@ public void stop() {

@Override
public ConfigDef config() {
return SINK_CONFIG_DEF;
return GeodeSinkConnectorConfig.SINK_CONFIG_DEF;
}

@Override
@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.sink;
package org.apache.geode.kafka.sink;

import java.util.Collection;
import java.util.HashMap;
@@ -22,13 +22,13 @@

import org.apache.kafka.connect.sink.SinkRecord;
import org.apache.kafka.connect.sink.SinkTask;
import org.geode.kafka.GeodeContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.geode.cache.Region;
import org.apache.geode.cache.RegionExistsException;
import org.apache.geode.cache.client.ClientRegionShortcut;
import org.apache.geode.kafka.GeodeContext;


/**
@@ -12,13 +12,14 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.sink;
package org.apache.geode.kafka.sink;

import java.util.List;
import java.util.Map;

import org.apache.kafka.common.config.ConfigDef;
import org.geode.kafka.GeodeConnectorConfig;

import org.apache.geode.kafka.GeodeConnectorConfig;

public class GeodeSinkConnectorConfig extends GeodeConnectorConfig {
public static final ConfigDef SINK_CONFIG_DEF = configurables();
@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.source;
package org.apache.geode.kafka.source;

import java.util.concurrent.BlockingQueue;
import java.util.function.Supplier;
@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.source;
package org.apache.geode.kafka.source;

import org.apache.geode.cache.query.CqEvent;

@@ -12,9 +12,9 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.source;
package org.apache.geode.kafka.source;

import static org.geode.kafka.source.GeodeSourceConnectorConfig.SOURCE_CONFIG_DEF;
import static org.apache.geode.kafka.source.GeodeSourceConnectorConfig.SOURCE_CONFIG_DEF;

import java.util.ArrayList;
import java.util.HashMap;
@@ -26,7 +26,8 @@
import org.apache.kafka.connect.connector.Task;
import org.apache.kafka.connect.source.SourceConnector;
import org.apache.kafka.connect.util.ConnectorUtils;
import org.geode.kafka.GeodeConnectorConfig;

import org.apache.geode.kafka.GeodeConnectorConfig;


public class GeodeKafkaSource extends SourceConnector {
@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.source;
package org.apache.geode.kafka.source;

import java.util.concurrent.TimeUnit;

@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.source;
package org.apache.geode.kafka.source;

import java.util.ArrayList;
import java.util.Collection;
@@ -23,14 +23,14 @@

import org.apache.kafka.connect.source.SourceRecord;
import org.apache.kafka.connect.source.SourceTask;
import org.geode.kafka.GeodeContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.geode.cache.query.CqAttributes;
import org.apache.geode.cache.query.CqAttributesFactory;
import org.apache.geode.cache.query.CqResults;
import org.apache.geode.cache.query.Struct;
import org.apache.geode.kafka.GeodeContext;

public class GeodeKafkaSourceTask extends SourceTask {

@@ -12,14 +12,15 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.source;
package org.apache.geode.kafka.source;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.apache.kafka.common.config.ConfigDef;
import org.geode.kafka.GeodeConnectorConfig;

import org.apache.geode.kafka.GeodeConnectorConfig;

public class GeodeSourceConnectorConfig extends GeodeConnectorConfig {

@@ -12,7 +12,7 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.geode.kafka.source;
package org.apache.geode.kafka.source;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

0 comments on commit 792e301

Please sign in to comment.