manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1784693 - in /manifoldcf/trunk/connectors/kafka/connector/src: main/resources/org/apache/manifoldcf/agents/output/kafka/ test/java/org/apache/manifoldcf/agents/output/kafka/
Date Tue, 28 Feb 2017 07:13:30 GMT
Author: kwright
Date: Tue Feb 28 07:13:30 2017
New Revision: 1784693

URL: http://svn.apache.org/viewvc?rev=1784693&view=rev
Log:
Fix for CONNECTORS-1391.

Modified:
    manifoldcf/trunk/connectors/kafka/connector/src/main/resources/org/apache/manifoldcf/agents/output/kafka/viewConfiguration.html
    manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseITHSQLDB.java
    manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseUIHSQLDB.java
    manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/NavigationHSQLDBUI.java

Modified: manifoldcf/trunk/connectors/kafka/connector/src/main/resources/org/apache/manifoldcf/agents/output/kafka/viewConfiguration.html
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/kafka/connector/src/main/resources/org/apache/manifoldcf/agents/output/kafka/viewConfiguration.html?rev=1784693&r1=1784692&r2=1784693&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/kafka/connector/src/main/resources/org/apache/manifoldcf/agents/output/kafka/viewConfiguration.html
(original)
+++ manifoldcf/trunk/connectors/kafka/connector/src/main/resources/org/apache/manifoldcf/agents/output/kafka/viewConfiguration.html
Tue Feb 28 07:13:30 2017
@@ -16,17 +16,16 @@
 -->
 
 <table class="displaytable">
-    <tr>
-        <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('KafkaConnector.IPColon'))</nobr>
-
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('KafkaConnector.IPColon'))</nobr></td>
     <td class="value">$Encoder.bodyEscape($IP)</td>
-</tr>
-<tr>
+  </tr>
+  <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('KafkaConnector.PortColon'))</nobr></td>
-<td class="value">$Encoder.bodyEscape($PORT)</td>
-</tr>
-<tr>
+    <td class="value">$Encoder.bodyEscape($PORT)</td>
+  </tr>
+  <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('KafkaConnector.TopicColon'))</nobr></td>
-<td class="value">$Encoder.bodyEscape($TOPIC)</td>
-</tr>
+    <td class="value">$Encoder.bodyEscape($TOPIC)</td>
+  </tr>
 </table>
\ No newline at end of file

Modified: manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseITHSQLDB.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseITHSQLDB.java?rev=1784693&r1=1784692&r2=1784693&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseITHSQLDB.java
(original)
+++ manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseITHSQLDB.java
Tue Feb 28 07:13:30 2017
@@ -26,7 +26,7 @@ import org.junit.Before;
 
 public class BaseITHSQLDB extends org.apache.manifoldcf.crawler.tests.BaseITHSQLDB {
 
-  static KafkaLocal kafka;
+  KafkaLocal kafka;
 
   protected String[] getConnectorNames() {
     return new String[]{"CMIS"};

Modified: manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseUIHSQLDB.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseUIHSQLDB.java?rev=1784693&r1=1784692&r2=1784693&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseUIHSQLDB.java
(original)
+++ manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/BaseUIHSQLDB.java
Tue Feb 28 07:13:30 2017
@@ -17,8 +17,17 @@
 
 package org.apache.manifoldcf.agents.output.kafka;
 
+import java.io.File;
+
+import java.util.Properties;
+import org.junit.After;
+import static org.junit.Assert.fail;
+import org.junit.Before;
+
 public class BaseUIHSQLDB extends org.apache.manifoldcf.crawler.tests.ConnectorBaseUIHSQLDB
{
 
+  KafkaLocal kafka;
+
   protected String[] getConnectorNames() {
     return new String[]{"Test Connector"};
   }
@@ -35,4 +44,52 @@ public class BaseUIHSQLDB extends org.ap
     return new String[]{"org.apache.manifoldcf.agents.output.kafka.KafkaOutputConnector"};
   }
 
+  @Before
+  public void setupKafka()
+          throws Exception {
+    Properties kafkaProperties = new Properties();
+    Properties zkProperties = new Properties();
+
+    String tmpDir = System.getProperty("java.io.tmpdir");
+    File logDir = new File(tmpDir, "kafka-logs");
+    logDir.mkdir();
+    File zookeeperDir = new File(tmpDir, "zookeeper");
+    zookeeperDir.mkdir();
+            
+    //load properties
+    kafkaProperties.put("broker.id", "0");
+    kafkaProperties.put("port", "9092");
+    kafkaProperties.put("num.network.threads", "3");
+    kafkaProperties.put("num.io.threads", "8");
+    kafkaProperties.put("socket.send.buffer.bytes", "102400");
+    kafkaProperties.put("socket.receive.buffer.bytes", "102400");
+    kafkaProperties.put("socket.request.max.bytes", "104857600");
+    kafkaProperties.put("log.dirs", logDir.getAbsolutePath());
+    kafkaProperties.put("num.partitions", "1");
+    kafkaProperties.put("num.recovery.threads.per.data.dir", "1");
+    kafkaProperties.put("log.retention.hours", "168");
+    kafkaProperties.put("log.segment.bytes", "1073741824");
+    kafkaProperties.put("log.retention.check.interval.ms", "300000");
+    kafkaProperties.put("log.cleaner.enable", "false");
+    kafkaProperties.put("zookeeper.connect", "localhost:2181");
+    kafkaProperties.put("zookeeper.connection.timeout.ms", "6000");
+
+    zkProperties.put("dataDir", zookeeperDir.getAbsolutePath());
+    zkProperties.put("clientPort", "2181");
+    zkProperties.put("maxClientCnxns", "0");
+
+    //kafkaProperties.load(Class.class.getResourceAsStream("/kafkalocal.properties"));
+    //zkProperties.load(Class.class.getResourceAsStream("/zklocal.properties"));
+    System.out.println("Kafka is starting...");
+
+    //start kafka
+    kafka = new KafkaLocal(kafkaProperties, zkProperties);
+    Thread.sleep(5000);
+  }
+
+  @After
+  public void cleanUpKafka() {
+    kafka.stop();
+  }
+
 }

Modified: manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/NavigationHSQLDBUI.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/NavigationHSQLDBUI.java?rev=1784693&r1=1784692&r2=1784693&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/NavigationHSQLDBUI.java
(original)
+++ manifoldcf/trunk/connectors/kafka/connector/src/test/java/org/apache/manifoldcf/agents/output/kafka/NavigationHSQLDBUI.java
Tue Feb 28 07:13:30 2017
@@ -26,7 +26,6 @@ import org.junit.Ignore;
 public class NavigationHSQLDBUI extends BaseUIHSQLDB {
 
   @Test
-  @Ignore
   public void createConnectionsAndJob()
           throws Exception {
     testerInstance.newTest(Locale.US);



Mime
View raw message