Skip to content

Commit 663bc23

Browse files
committed
Fix build error
Change-Id: I539f41888732850f667a8f3c484ad8989b68cc11
1 parent e0c1856 commit 663bc23

17 files changed

Lines changed: 28 additions & 22 deletions

hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/service/TestRangerBGSyncService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public void setUp() throws IOException {
177177
Path metaDirPath = Paths.get(path, "om-meta");
178178
conf.set(HddsConfigKeys.OZONE_METADATA_DIRS, metaDirPath.toString());
179179

180-
omMetrics = OMMetrics.create();
180+
omMetrics = OMMetrics.create(conf);
181181
conf.set(OMConfigKeys.OZONE_OM_DB_DIRS,
182182
folder.resolve("om").toAbsolutePath().toString());
183183
// No need to conf.set(OzoneConfigKeys.OZONE_ADMINISTRATORS, ...) here

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBuffer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ class TestOzoneManagerDoubleBuffer {
106106

107107
@BeforeEach
108108
public void setup() throws IOException {
109-
OMMetrics omMetrics = OMMetrics.create();
110109
OzoneConfiguration ozoneConfiguration = new OzoneConfiguration();
110+
OMMetrics omMetrics = OMMetrics.create(ozoneConfiguration);
111111
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
112112
tempDir.getAbsolutePath());
113113

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBufferWithOMResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ public class TestOzoneManagerDoubleBufferWithOMResponse {
9191
@BeforeEach
9292
public void setup() throws IOException {
9393
ozoneManager = mock(OzoneManager.class, withSettings().stubOnly());
94-
OMMetrics omMetrics = OMMetrics.create();
9594
OzoneConfiguration ozoneConfiguration = new OzoneConfiguration();
95+
OMMetrics omMetrics = OMMetrics.create(ozoneConfiguration);
9696
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
9797
folder.toAbsolutePath().toString());
9898
omMetadataManager = new OmMetadataManagerImpl(ozoneConfiguration,

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerStateMachine.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,10 +1041,11 @@ private RaftClientRequest buildClientRequest(
10411041

10421042
@Test
10431043
public void testRatisEventsRecording() {
1044-
OMMetrics metrics = OMMetrics.create();
1044+
OzoneConfiguration conf = new OzoneConfiguration();
1045+
OMMetrics metrics = OMMetrics.create(conf);
10451046
when(om.getMetrics()).thenReturn(metrics);
10461047
when(om.getOmSnapshotManager()).thenReturn(mock(OmSnapshotManager.class));
1047-
when(om.getConfiguration()).thenReturn(new OzoneConfiguration());
1048+
when(om.getConfiguration()).thenReturn(conf);
10481049
AuditMessage auditMessage = mock(AuditMessage.class);
10491050
when(auditMessage.getOp()).thenReturn("LEADER_CHANGE");
10501051
when(om.buildAuditMessageForSuccess(any(), any())).thenReturn(auditMessage);

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/TestOMClientRequestWithUserInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public class TestOMClientRequestWithUserInfo {
7070
@BeforeEach
7171
public void setup() throws Exception {
7272
ozoneManager = mock(OzoneManager.class);
73-
OMMetrics omMetrics = OMMetrics.create();
7473
OzoneConfiguration ozoneConfiguration = new OzoneConfiguration();
74+
OMMetrics omMetrics = OMMetrics.create(ozoneConfiguration);
7575
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
7676
folder.toAbsolutePath().toString());
7777
OMMetadataManager omMetadataManager = new OmMetadataManagerImpl(ozoneConfiguration,

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/bucket/TestBucketRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public class TestBucketRequest {
5959
public void setup() throws Exception {
6060

6161
ozoneManager = mock(OzoneManager.class);
62-
omMetrics = OMMetrics.create();
6362
OzoneConfiguration ozoneConfiguration = new OzoneConfiguration();
63+
omMetrics = OMMetrics.create(ozoneConfiguration);
6464
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
6565
folder.toAbsolutePath().toString());
6666
when(ozoneManager.getConfiguration()).thenReturn(ozoneConfiguration);

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/file/TestOMDirectoryCreateRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ public class TestOMDirectoryCreateRequest {
9292
@BeforeEach
9393
public void setup() throws Exception {
9494
ozoneManager = mock(OzoneManager.class);
95-
omMetrics = OMMetrics.create();
9695
OzoneConfiguration ozoneConfiguration = new OzoneConfiguration();
96+
omMetrics = OMMetrics.create(ozoneConfiguration);
9797
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
9898
folder.toAbsolutePath().toString());
9999
omMetadataManager = new OmMetadataManagerImpl(ozoneConfiguration,

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/file/TestOMDirectoryCreateRequestWithFSO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ public class TestOMDirectoryCreateRequestWithFSO {
9292
@BeforeEach
9393
public void setup() throws Exception {
9494
ozoneManager = mock(OzoneManager.class);
95-
omMetrics = OMMetrics.create();
9695
OzoneConfiguration ozoneConfiguration = new OzoneConfiguration();
96+
omMetrics = OMMetrics.create(ozoneConfiguration);
9797
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
9898
folder.toAbsolutePath().toString());
9999
OMRequestTestUtils.configureFSOptimizedPaths(ozoneConfiguration, true);

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMKeyRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ public class TestOMKeyRequest {
136136
@BeforeEach
137137
public void setup() throws Exception {
138138
ozoneManager = mock(OzoneManager.class);
139-
omMetrics = OMMetrics.create();
139+
OzoneConfiguration ozoneConfiguration = getOzoneConfiguration();
140+
omMetrics = OMMetrics.create(ozoneConfiguration);
140141
perfMetrics = OMPerformanceMetrics.register();
141142
delMetrics = DeletingServiceMetrics.create();
142-
OzoneConfiguration ozoneConfiguration = getOzoneConfiguration();
143143
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
144144
folder.toAbsolutePath().toString());
145145
ozoneConfiguration.set(OzoneConfigKeys.OZONE_METADATA_DIRS,

hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/s3/multipart/TestS3MultipartRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public class TestS3MultipartRequest {
7777
@BeforeEach
7878
public void setup() throws Exception {
7979
ozoneManager = mock(OzoneManager.class);
80-
omMetrics = OMMetrics.create();
8180
OzoneConfiguration ozoneConfiguration = new OzoneConfiguration();
81+
omMetrics = OMMetrics.create(ozoneConfiguration);
8282
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
8383
folder.toAbsolutePath().toString());
8484
omMetadataManager = new OmMetadataManagerImpl(ozoneConfiguration,

0 commit comments

Comments
 (0)