Merge branch 'master' into 6088-Time-Ordering-On-Scans-V2

This commit is contained in:
Justin Borromeo 2019-02-06 15:05:11 -08:00
commit e8a4b49044
3 changed files with 36 additions and 9 deletions

View File

@ -47,9 +47,9 @@ As an example, to set the region to 'us-east-1' through system properties:
|`druid.storage.baseKey`|Base key prefix to use, i.e. what directory.|Must be set.|
|`druid.storage.disableAcl`|Boolean flag to disable ACL. If this is set to `false`, the full control would be granted to the bucket owner. This may require to set additional permissions. See [S3 permissions settings](#s3-permissions-settings).|false|
|`druid.storage.sse.type`|Server-side encryption type. Should be one of `s3`, `kms`, and `custom`. See the below [Server-side encryption section](#server-side-encryption) for more details.|None|
|`druid.storage.sse.kms.keyId`|AWS KMS key ID. Can be empty if `druid.storage.sse.type` is `kms`.|None|
|`druid.storage.sse.kms.keyId`|AWS KMS key ID. This is used only when `druid.storage.sse.type` is `kms` and can be empty to use the default key ID.|None|
|`druid.storage.sse.custom.base64EncodedKey`|Base64-encoded key. Should be specified if `druid.storage.sse.type` is `custom`.|None|
|`druid.s3.protocol`|Communication protocol type to use when sending requests to AWS. `http` or `https` can be used.|`https`|
|`druid.s3.protocol`|Communication protocol type to use when sending requests to AWS. `http` or `https` can be used. This configuration would be ignored if `druid.s3.endpoint.url` is filled with a URL with a different protocol.|`https`|
|`druid.s3.disableChunkedEncoding`|Disables chunked encoding. See [AWS document](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3Builder.html#disableChunkedEncoding--) for details.|false|
|`druid.s3.enablePathStyleAccess`|Enables path style access. See [AWS document](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3Builder.html#enablePathStyleAccess--) for details.|false|
|`druid.s3.forceGlobalBucketAccessEnabled`|Enables global bucket access. See [AWS document](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3Builder.html#setForceGlobalBucketAccessEnabled-java.lang.Boolean-) for details.|false|

View File

@ -1073,16 +1073,13 @@ public class TaskLockbox
return true;
}
if (!getClass().equals(o.getClass())) {
if (o == null || !getClass().equals(o.getClass())) {
return false;
}
final TaskLockPosse that = (TaskLockPosse) o;
if (!taskLock.equals(that.taskLock)) {
return false;
}
return taskIds.equals(that.taskIds);
TaskLockPosse that = (TaskLockPosse) o;
return java.util.Objects.equals(taskLock, that.taskLock) &&
java.util.Objects.equals(taskIds, that.taskIds);
}
@Override

View File

@ -667,6 +667,36 @@ public class TaskLockboxTest
Assert.assertTrue(lowLockPosse.getTaskLock().isRevoked());
}
@Test
public void testLockPosseEquals()
{
final Task task1 = NoopTask.create();
final Task task2 = NoopTask.create();
TaskLock taskLock1 = new TaskLock(TaskLockType.EXCLUSIVE,
task1.getGroupId(),
task1.getDataSource(),
Intervals.of("2018/2019"),
"v1",
task1.getPriority());
TaskLock taskLock2 = new TaskLock(TaskLockType.EXCLUSIVE,
task2.getGroupId(),
task2.getDataSource(),
Intervals.of("2018/2019"),
"v2",
task2.getPriority());
TaskLockPosse taskLockPosse1 = new TaskLockPosse(taskLock1);
TaskLockPosse taskLockPosse2 = new TaskLockPosse(taskLock2);
TaskLockPosse taskLockPosse3 = new TaskLockPosse(taskLock1);
Assert.assertNotEquals(taskLockPosse1, null);
Assert.assertNotEquals(null, taskLockPosse1);
Assert.assertNotEquals(taskLockPosse1, taskLockPosse2);
Assert.assertEquals(taskLockPosse1, taskLockPosse3);
}
private Set<TaskLock> getAllLocks(List<Task> tasks)
{
return tasks.stream()