From f51eceadad3306e0f42482aefeea10352f658dd7 Mon Sep 17 00:00:00 2001 From: Stephane Maarek Date: Mon, 1 May 2017 19:35:35 +1000 Subject: [PATCH] fixed a few bugs added more log in case of 404 bumped version to 1.1 --- pom.xml | 2 +- .../java/com/simplesteph/kafka/GitHubAPIHttpClient.java | 1 + src/main/java/com/simplesteph/kafka/GitHubSchemas.java | 9 ++++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 32cb4c0..1cff8da 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.simplesteph.kafka kafka-connect-github-source - 1.0 + 1.1 jar kafka-connect-github-source diff --git a/src/main/java/com/simplesteph/kafka/GitHubAPIHttpClient.java b/src/main/java/com/simplesteph/kafka/GitHubAPIHttpClient.java index cb8f632..3e17a09 100644 --- a/src/main/java/com/simplesteph/kafka/GitHubAPIHttpClient.java +++ b/src/main/java/com/simplesteph/kafka/GitHubAPIHttpClient.java @@ -59,6 +59,7 @@ protected JSONArray getNextIssues(Integer page, Instant since) throws Interrupte Thread.sleep(1000 * sleepTime); return getNextIssues(page, since); default: + log.error(constructUrl(page, since)); log.error(String.valueOf(jsonResponse.getStatus())); log.error(jsonResponse.getBody().toString()); log.error(jsonResponse.getHeaders().toString()); diff --git a/src/main/java/com/simplesteph/kafka/GitHubSchemas.java b/src/main/java/com/simplesteph/kafka/GitHubSchemas.java index 13894aa..b790a15 100644 --- a/src/main/java/com/simplesteph/kafka/GitHubSchemas.java +++ b/src/main/java/com/simplesteph/kafka/GitHubSchemas.java @@ -8,7 +8,6 @@ public class GitHubSchemas { public static String NEXT_PAGE_FIELD = "next_page"; // Issue fields - public static String FULL_REPO_FIELD = "owner/repository"; public static String OWNER_FIELD = "owner"; public static String REPOSITORY_FIELD = "repository"; public static String CREATED_AT_FIELD = "created_at"; @@ -32,10 +31,10 @@ public class GitHubSchemas { public static String PR_HTML_URL_FIELD = "html_url"; // Schema names - public static String SCHEMA_KEY = "GitHub Issue Key"; - public static String SCHEMA_VALUE_ISSUE = "Issue"; - public static String SCHEMA_VALUE_USER = "User"; - public static String SCHEMA_VALUE_PR = "PR"; + public static String SCHEMA_KEY = "issue_key"; + public static String SCHEMA_VALUE_ISSUE = "issue"; + public static String SCHEMA_VALUE_USER = "user"; + public static String SCHEMA_VALUE_PR = "pr"; // Key Schema public static Schema KEY_SCHEMA = SchemaBuilder.struct().name(SCHEMA_KEY)