nvharikrishna commented on code in PR #215:
URL: https://github.com/apache/cassandra-sidecar/pull/215#discussion_r2157461917
##########
client-common/src/main/java/org/apache/cassandra/sidecar/common/ApiEndpointsV1.java:
##########
@@ -147,13 +154,50 @@ public final class ApiEndpointsV1
public static final String LIVE_MIGRATION_FILES_API =
LIVE_MIGRATION_API_PREFIX + "/files";
- public static final String LIVE_MIGRATION_CDC_RAW_DIR_PATH =
LIVE_MIGRATION_FILES_API + "/cdc_raw";
- public static final String LIVE_MIGRATION_COMMITLOG_DIR_PATH =
LIVE_MIGRATION_FILES_API + "/commitlog";
- public static final String LIVE_MIGRATION_DATA_FILE_DIR_PATH =
LIVE_MIGRATION_FILES_API + "/data";
- public static final String LIVE_MIGRATION_HINTS_DIR_PATH =
LIVE_MIGRATION_FILES_API + "/hints";
+ public static final String DIR_TYPE_PARAM = "dirType";
+ public static final String DIR_INDEX_PARAM = "dirIndex";
+ public static final String LIVE_MIGRATION_FILE_TRANSFER_API =
LIVE_MIGRATION_FILES_API + "/:" + DIR_TYPE_PARAM
+ + "/:" +
DIR_INDEX_PARAM + "/*";
+
+ /**
+ * Enum for holding different type of directories handled by Live
Migration.
+ */
+ public enum LiveMigrationDirType
Review Comment:
Thanks!, sounds better.
##########
server/src/main/java/org/apache/cassandra/sidecar/acl/authorization/BasicPermissions.java:
##########
@@ -79,4 +79,5 @@ public class BasicPermissions
// Live Migration permissions
public static final Permission LIST_FILES = new
DomainAwarePermission("LIVE_MIGRATION:LIST_FILES", CLUSTER_SCOPE);
+ public static final Permission STREAM_FILES = new
DomainAwarePermission("LIVE_MIGRATION:STREAM", CLUSTER_SCOPE);
Review Comment:
Created a separate permission so that STREAM_FILES can be given only to
Sidecars and LIST_FILES can be given to users. Doesn't it make sense?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]