HDFS-13127. Fix TestContainerStateManager and TestOzoneConfigurationFields. Contributed by Mukul Kumar Singh.
This commit is contained in:
parent
443425a5d9
commit
3cf07b43bc
|
@ -89,9 +89,7 @@ import static java.net.HttpURLConnection.HTTP_OK;
|
|||
|
||||
/**
|
||||
* Ozone Client REST protocol implementation. It uses REST protocol to
|
||||
* connect to Ozone Handler that executes client calls. RestClient uses
|
||||
* <code>ozone.rest.servers</code> and <code>ozone.rest.client.port</code>
|
||||
* to discover Ozone Rest Server.
|
||||
* connect to Ozone Handler that executes client calls.
|
||||
*/
|
||||
public class RestClient implements ClientProtocol {
|
||||
|
||||
|
|
|
@ -415,8 +415,7 @@ public class ContainerStateManager implements Closeable {
|
|||
// Get the container with space to meet our request.
|
||||
for (ContainerID id : searchSet) {
|
||||
ContainerInfo containerInfo = containers.getContainerInfo(id.getId());
|
||||
if ((containerInfo.getAllocatedBytes() <= this.containerSize) &&
|
||||
(containerInfo.getAllocatedBytes() <= size)) {
|
||||
if (containerInfo.getAllocatedBytes() + size <= this.containerSize) {
|
||||
containerInfo.updateLastUsedTime();
|
||||
|
||||
ContainerState key = new ContainerState(owner,
|
||||
|
|
|
@ -1204,25 +1204,6 @@
|
|||
percentage in float notation (X.Yf), with 1.0f meaning 100%.
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>ozone.rest.servers</name>
|
||||
<value></value>
|
||||
<tag>OZONE, CLIENT</tag>
|
||||
<description>
|
||||
The REST server hostnames to connect, comma separated list of host
|
||||
(typically datanodes) where Ozone REST handler are running.
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>ozone.rest.client.port</name>
|
||||
<value>9864</value>
|
||||
<tag>OZONE, CLIENT</tag>
|
||||
<description>
|
||||
Port used by client to connect to Ozone REST server. When a datanode
|
||||
is configured to run Ozone REST handler, this port typically points to
|
||||
datanode info port.
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>ozone.rest.client.http.connection.max</name>
|
||||
<value>100</value>
|
||||
|
|
|
@ -159,11 +159,13 @@ public class TestContainerStateManager {
|
|||
scmContainerMapping.updateContainerState(container2,
|
||||
OzoneProtos.LifeCycleEvent.CREATED);
|
||||
|
||||
// space has already been allocated in container1, now container 2 should
|
||||
// be chosen.
|
||||
info = stateManager
|
||||
.getMatchingContainer(OzoneConsts.GB * 3, containerOwner,
|
||||
xceiverClientManager.getType(), xceiverClientManager.getFactor(),
|
||||
OzoneProtos.LifeCycleState.OPEN);
|
||||
Assert.assertEquals(container1, info.getContainerName());
|
||||
Assert.assertEquals(container2, info.getContainerName());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue