Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fbe0048
Bump Jackson to 2.9.9
Fokko May 17, 2019
a119e8f
Add helper for Kinesis
Fokko May 20, 2019
7d0a465
Restore missing test
Fokko May 27, 2019
9e64680
Merge branch 'master' of github.com:apache/incubator-druid into fd-try-2
Fokko Jul 30, 2019
4dd064e
Fix deprecated Jackson method
Fokko Jul 30, 2019
1377828
Merge branch 'master' of github.com:apache/incubator-druid into fd-try-2
Fokko Jul 31, 2019
9bd12ff
Merge branch 'master' of github.com:apache/incubator-druid into fd-try-2
Fokko Aug 13, 2019
1484e25
Merge branch 'master' of github.com:apache/incubator-druid into fd-try-2
Fokko Sep 27, 2019
6ef2b31
Fix licenses
Fokko Sep 27, 2019
a3a8e69
Bump to Jackson 2.9.10
Fokko Sep 28, 2019
9222705
Bump HttpClient to 4.5.10 (#8404)
Fokko Sep 27, 2019
824f945
Remove commons-httpclient (#8407)
Fokko Sep 27, 2019
21ed4e4
bug fix for lookup leak when we remove the last lookup from lookup ti…
FaxianZhao Sep 27, 2019
12c1ba5
Increase column size for taskID and createdTime, and decrease Type an…
renevan10 Sep 27, 2019
e670361
Making optimal usage of multiple segment cache locations (#8038)
sashidhar Sep 28, 2019
f98ea80
readme gifs (#8608)
vogievetsky Sep 30, 2019
d3f4e52
Remove the Creators
Fokko Sep 30, 2019
cbaad0d
Fix licenses
Fokko Sep 30, 2019
0ba7fe3
Merge branch 'master' of github.com:apache/incubator-druid into fd-try-2
Fokko Sep 30, 2019
fbe8097
Add default constructor
Fokko Sep 30, 2019
75880cb
One missing JsonUnwrapped
Fokko Sep 30, 2019
46502ac
Add READONLY annotation
Fokko Sep 30, 2019
dd51bda
Make the dataSegment optional
Fokko Sep 30, 2019
24d894a
Fix order
Fokko Oct 1, 2019
cdd91f8
Set the order explicitly
Fokko Oct 1, 2019
f3351f4
Fix the order of the keys
Fokko Oct 1, 2019
57f6588
Merge branch 'master' of github.com:apache/incubator-druid into fd-try-2
Fokko Oct 1, 2019
385d9c4
Fix checkstyle
Fokko Oct 1, 2019
7db70a1
Remove unnecessary change
Fokko Oct 1, 2019
e506f4b
Merge branch 'master' of github.com:apache/incubator-druid into fd-try-2
Fokko Nov 6, 2019
d81048b
Bump to Jackson 2.10.0
Fokko Nov 6, 2019
5b87e15
Merge branch 'master' of github.com:apache/incubator-druid into fd-try-2
Fokko Jan 5, 2020
4d0083f
Merge conflicts
Fokko Jan 5, 2020
259e5a0
Resolve merge conflicts
Fokko Jan 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void testBadTypeSerde() throws IOException

expectedException.expect(IllegalArgumentException.class);
expectedException.expectCause(CoreMatchers.instanceOf(JsonMappingException.class));
expectedException.expectMessage("Could not resolve type id 'foo' as a subtype");
expectedException.expectMessage("Could not resolve type id 'foo' as a subtype of [simple type, class org.apache.druid.data.input.impl.ParseSpec]: known type ids = [csv, javascript, json, jsonLowercase, regex, timeAndDims, tsv]");
mapper.convertValue(mapValue, ParseSpec.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
public class KafkaDataSourceMetadata extends SeekableStreamDataSourceMetadata<Integer, Long>
{

@JsonCreator
public KafkaDataSourceMetadata(
@JsonProperty("partitions") SeekableStreamEndSequenceNumbers<Integer, Long> kafkaPartitions
)
{
super(kafkaPartitions);
}

@JsonCreator
public KafkaDataSourceMetadata(
@JsonProperty("partitions") SeekableStreamSequenceNumbers<Integer, Long> kafkaPartitions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.jsontype.NamedType;
import com.google.common.base.Optional;
Expand Down Expand Up @@ -51,7 +50,7 @@ public class KafkaIOConfigTest
public KafkaIOConfigTest()
{
mapper = new DefaultObjectMapper();
mapper.registerModules((Iterable<Module>) new KafkaIndexTaskModule().getJacksonModules());
mapper.registerModules(new KafkaIndexTaskModule().getJacksonModules());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary cast

}

@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@

public class KinesisDataSourceMetadata extends SeekableStreamDataSourceMetadata<String, String>
{
@JsonCreator
public KinesisDataSourceMetadata(
@JsonProperty("partitions") SeekableStreamEndSequenceNumbers<String, String> kinesisPartitions
)
{
super(kinesisPartitions);
}

@JsonCreator
public KinesisDataSourceMetadata(
@JsonProperty("partitions") SeekableStreamSequenceNumbers<String, String> kinesisPartitions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ public static List<DataSegment> getPublishedSegments(HadoopDruidIndexerConfig co

final Path descriptorInfoDir = config.makeDescriptorInfoDir();

try {
FileSystem fs = descriptorInfoDir.getFileSystem(conf);

try (FileSystem fs = descriptorInfoDir.getFileSystem(conf)) {
for (FileStatus status : fs.listStatus(descriptorInfoDir)) {
final DataSegment segment = jsonMapper.readValue((InputStream) fs.open(status.getPath()), DataSegment.class);
publishedSegmentsBuilder.add(segment);
log.info("Adding segment %s to the list of published segments", segment.getId());
try (final InputStream input = fs.open(status.getPath())) {
final DataSegment segment = jsonMapper.readValue(input, DataSegment.class);
publishedSegmentsBuilder.add(segment);
log.info("Adding segment %s to the list of published segments", segment.getId());
}
}
}
catch (FileNotFoundException e) {
Expand All @@ -134,9 +134,8 @@ public static List<DataSegment> getPublishedSegments(HadoopDruidIndexerConfig co
catch (IOException e) {
throw new RuntimeException(e);
}
List<DataSegment> publishedSegments = publishedSegmentsBuilder.build();

return publishedSegments;
return publishedSegmentsBuilder.build();
}

private final HadoopDruidIndexerConfig config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,10 @@

package org.apache.druid.indexing.seekablestream;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import org.apache.druid.indexing.overlord.DataSourceMetadata;

import java.util.Map;

@JsonTypeInfo(use = Id.NAME, property = "type", defaultImpl = SeekableStreamEndSequenceNumbers.class)
@JsonSubTypes({
@Type(name = "start", value = SeekableStreamStartSequenceNumbers.class),
@Type(name = "end", value = SeekableStreamEndSequenceNumbers.class)
})
public interface SeekableStreamSequenceNumbers<PartitionIdType, SequenceOffsetType>
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ default Collection<DataSegment> getUsedSegmentsForInterval(String dataSource, In
* @param segments set of segments to add
*
* @return set of segments actually added
*
* @throws IOException
*/
Set<DataSegment> announceHistoricalSegments(Set<DataSegment> segments) throws IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.apache.druid.server.coordination;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import org.apache.druid.java.util.common.StringUtils;
Expand All @@ -29,22 +28,24 @@

import java.util.Objects;


/**
*/
public class SegmentChangeRequestDrop implements DataSegmentChangeRequest
{
private final DataSegment segment;
@JsonUnwrapped
private DataSegment segment;

public SegmentChangeRequestDrop()
{
}

@JsonCreator
public SegmentChangeRequestDrop(
@JsonUnwrapped DataSegment segment
)
public SegmentChangeRequestDrop(DataSegment segment)
{
this.segment = segment;
}

@JsonProperty
@JsonUnwrapped
public DataSegment getSegment()
{
return segment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.apache.druid.server.coordination;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import org.apache.druid.java.util.common.StringUtils;
Expand All @@ -33,12 +32,14 @@
*/
public class SegmentChangeRequestLoad implements DataSegmentChangeRequest
{
private final DataSegment segment;
@JsonUnwrapped
private DataSegment segment;

@JsonCreator
public SegmentChangeRequestLoad(
@JsonUnwrapped DataSegment segment
)
public SegmentChangeRequestLoad()
{
}

public SegmentChangeRequestLoad(DataSegment segment)
{
this.segment = segment;
}
Expand All @@ -50,7 +51,6 @@ public void go(DataSegmentChangeHandler handler, @Nullable DataSegmentChangeCall
}

@JsonProperty
@JsonUnwrapped
public DataSegment getSegment()
{
return segment;
Expand Down