Skip to content

Commit

Permalink
Mocked hbck and catalog janitor report object and variable name updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihir Monani committed Mar 22, 2024
1 parent caaee3d commit 8177556
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,22 @@ private void finishActiveMasterInitialization() throws IOException, InterruptedE
status.markComplete("Progress after master initialized complete");
}

/**
* Used for testing only to set Mock objects.
* @param hbckChore hbckChore
*/
public void setHbckChoreForTesting(HbckChore hbckChore) {
this.hbckChore = hbckChore;
}

/**
* Used for testing only to set Mock objects.
* @param catalogJanitorChore catalogJanitorChore
*/
public void setCatalogJanitorChoreForTesting(CatalogJanitor catalogJanitorChore) {
this.catalogJanitorChore = catalogJanitorChore;
}

private void createMissingCFsInMetaDuringUpgrade(TableDescriptor metaDescriptor)
throws IOException {
TableDescriptor newMetaDesc = TableDescriptorBuilder.newBuilder(metaDescriptor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@

@InterfaceAudience.Private
public class HbckOverlapRegions {
private final HbckRegionDetails region1;
private final HbckRegionDetails region2;
private final HbckRegionDetails region1Info;
private final HbckRegionDetails region2Info;

public HbckOverlapRegions(HbckRegionDetails region1, HbckRegionDetails region2) {
this.region1 = region1;
this.region2 = region2;
public HbckOverlapRegions(HbckRegionDetails region1Info, HbckRegionDetails region2Info) {
this.region1Info = region1Info;
this.region2Info = region2Info;
}

public HbckRegionDetails getRegion1() {
return region1;
public HbckRegionDetails getRegion1Info() {
return region1Info;
}

public HbckRegionDetails getRegion2() {
return region2;
public HbckRegionDetails getRegion2Info() {
return region2Info;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@

@InterfaceAudience.Private
public class HbckRegionHoles {
private final HbckRegionDetails region1;
private final HbckRegionDetails region2;
private final HbckRegionDetails region1Info;
private final HbckRegionDetails region2Info;

public HbckRegionHoles(HbckRegionDetails regionHole1, HbckRegionDetails regionHole2) {
this.region1 = regionHole1;
this.region2 = regionHole2;
public HbckRegionHoles(HbckRegionDetails region1Info, HbckRegionDetails region2Info) {
this.region1Info = region1Info;
this.region2Info = region2Info;
}

public HbckRegionDetails getRegion1() {
return region1;
public HbckRegionDetails getRegion1Info() {
return region1Info;
}

public HbckRegionDetails getRegion2() {
return region2;
public HbckRegionDetails getRegion2Info() {
return region2Info;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@

@InterfaceAudience.Private
public class HbckUnknownServers {
private final HbckRegionDetails serverRegionId;
private final HbckRegionDetails regionInfo;
private final HbckServerName serverName;

public HbckUnknownServers(HbckRegionDetails unknownServerRegionId,
HbckServerName unknownServerName) {
this.serverRegionId = unknownServerRegionId;
public HbckUnknownServers(HbckRegionDetails regionInfo, HbckServerName unknownServerName) {
this.regionInfo = regionInfo;
this.serverName = unknownServerName;
}

public HbckRegionDetails getServerRegionId() {
return serverRegionId;
public HbckRegionDetails getRegionInfo() {
return regionInfo;
}

public HbckServerName getServerName() {
Expand Down
Loading

0 comments on commit 8177556

Please sign in to comment.