Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions extensions-core/azure-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.86</minimum>
<minimum>0.85</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
Expand All @@ -200,7 +200,7 @@
<limit>
<counter>METHOD</counter>
<value>COVEREDRATIO</value>
<minimum>0.79</minimum>
<minimum>0.78</minimum>
</limit>
<limit>
<counter>CLASS</counter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,7 @@ public DataSegment push(final File indexFilesDir, final DataSegment segment, fin
@Override
public Map<String, Object> makeLoadSpec(URI uri)
{
return ImmutableMap.of(
"type",
AzureStorageDruidModule.SCHEME,
"containerName",
segmentConfig.getContainer(),
"blobPath",
uri.toString()
);
return makeLoadSpec(uri.toString());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like hadoop indexing would still call this method so it might have issues with funny characters, but I don't think it is worth refactoring to fix the issue at this point.

}

@VisibleForTesting
Expand All @@ -186,12 +179,24 @@ DataSegment uploadDataSegment(

final DataSegment outSegment = segment
.withSize(size)
.withLoadSpec(this.makeLoadSpec(new URI(azurePath)))
.withLoadSpec(this.makeLoadSpec(azurePath))
.withBinaryVersion(binaryVersion);

log.debug("Deleting file [%s]", compressedSegmentData);
compressedSegmentData.delete();

return outSegment;
}

private Map<String, Object> makeLoadSpec(String prefix)
{
return ImmutableMap.of(
"type",
AzureStorageDruidModule.SCHEME,
"containerName",
segmentConfig.getContainer(),
"blobPath",
prefix
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public class AzureDataSegmentPusherTest extends EasyMockSupport
private static final String ACCOUNT = "account";
private static final String CONTAINER_NAME = "container";
private static final String PREFIX = "prefix";
private static final String BLOB_PATH = "test/2015-04-12T00:00:00.000Z_2015-04-13T00:00:00.000Z/1/0/index.zip";
private static final String BLOB_PATH = " Россия 한국 中国!?/2015-04-12T00:00:00.000Z_2015-04-13T00:00:00.000Z/1/0/index.zip";
private static final DataSegment DATA_SEGMENT = new DataSegment(
"test",
" Россия 한국 中国!?",
Intervals.of("2015-04-12/2015-04-13"),
"1",
ImmutableMap.of("containerName", CONTAINER_NAME, "blobPath", BLOB_PATH),
Expand Down