tkhurana commented on code in PR #2278:
URL: https://github.com/apache/phoenix/pull/2278#discussion_r2471184872
##########
phoenix-core-server/src/main/java/org/apache/phoenix/replication/ReplicationLogTracker.java:
##########
@@ -64,36 +63,33 @@ public class ReplicationLogTracker {
*/
private static final long DEFAULT_FILE_DELETE_RETRY_DELAY_MS = 1000L;
- private final URI rootURI;
- private final DirectoryType directoryType;
private final FileSystem fileSystem;
private Path inProgressDirPath;
- private ReplicationShardDirectoryManager replicationShardDirectoryManager;
+ private final ReplicationShardDirectoryManager
replicationShardDirectoryManager;
protected final Configuration conf;
protected final String haGroupName;
protected MetricsReplicationLogTracker metrics;
- public ReplicationLogTracker(final Configuration conf, final String
haGroupName,
- final FileSystem fileSystem, final URI rootURI, final DirectoryType
directoryType,
+ public ReplicationLogTracker(final Configuration conf, final String
haGroupName, final FileSystem fileSystem,
+ final ReplicationShardDirectoryManager
replicationShardDirectoryManager,
final MetricsReplicationLogTracker metrics) {
this.conf = conf;
- this.fileSystem = fileSystem;
this.haGroupName = haGroupName;
- this.rootURI = rootURI;
- this.directoryType = directoryType;
+ this.fileSystem = fileSystem;
+ this.replicationShardDirectoryManager =
replicationShardDirectoryManager;
this.metrics = metrics;
}
- protected String getNewLogSubDirectoryName() {
- return this.directoryType.getName();
- }
-
protected MetricsReplicationLogTracker getMetricsSource() {
return this.metrics;
}
+ protected String getInSubDirectoryName() {
+ return
getReplicationShardDirectoryManager().getRootDirectoryPath().getName();
+ }
+
protected String getInProgressLogSubDirectoryName() {
- return getNewLogSubDirectoryName() + "_progress";
+ return getInSubDirectoryName() + "_progress";
Review Comment:
Shouldn't this be a more generic name instead of `getInSubDirectoryName`
--
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]