Skip to content

Commit

Permalink
Merge pull request #54 from Graylog2/kinesis-json-code-cleanup
Browse files Browse the repository at this point in the history
Kinesis-related code cleanup
  • Loading branch information
ceruleancee authored Jun 5, 2019
2 parents 5c7c4b4 + a40be08 commit 4931756
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
10 changes: 2 additions & 8 deletions src/main/java/org/graylog/integrations/aws/KinesisService.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
public class KinesisService {

private static final Logger LOG = LoggerFactory.getLogger(AWSService.class);
private static final int KINESIS_LIST_STREAMS_MAX_ATTEMPTS = 100;
private static final int KINESIS_LIST_STREAMS_MAX_ATTEMPTS = 1000;
private static final int KINESIS_LIST_STREAMS_LIMIT = 30;

private final KinesisClientBuilder kinesisClientBuilder;
Expand All @@ -39,11 +39,6 @@ public KinesisService(KinesisClientBuilder kinesisClientBuilder) {
this.kinesisClientBuilder = kinesisClientBuilder;
}

static KinesisClient getKinesisClient() {
KinesisClient kinesisClient = KinesisClient.create();
return kinesisClient;
}

public KinesisHealthCheckResponse healthCheck(KinesisHealthCheckRequest heathCheckRequest) {

// TODO: Read a log message from Kinesis.
Expand Down Expand Up @@ -124,5 +119,4 @@ public List<String> getKinesisStreams(String regionName, String accessKeyId, Str
// TODO Subscribe to Kinesis Stream

// TODO getRecord

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public abstract class KinesisHealthCheckResponse {
public abstract String message();

public static KinesisHealthCheckResponse create(@JsonProperty("success") boolean success,
@JsonProperty("logType") String logType,
@JsonProperty("log_type") String logType,
@JsonProperty("message") String message) {
return new AutoValue_KinesisHealthCheckResponse(success, logType, message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public abstract class RegionResponse {
@JsonProperty
public abstract String displayValue();

public static RegionResponse create(@JsonProperty("regionId") String regionId,
@JsonProperty("regionDescription") String regionDescription,
@JsonProperty("displayValue") String displayValue ) {
public static RegionResponse create(@JsonProperty("region_id") String regionId,
@JsonProperty("region_description") String regionDescription,
@JsonProperty("display_value") String displayValue ) {
return new AutoValue_RegionResponse(regionId, regionDescription, displayValue);
}
}

0 comments on commit 4931756

Please sign in to comment.