[ https://issues.apache.org/jira/browse/HDFS-12680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210662#comment-16210662 ]
Yiqun Lin commented on HDFS-12680: ---------------------------------- Hi [~nandakumar131], besides [~anu]'s review comments, some other comments for unit test: # It would be better to define a var {{TIMEOUT=10000}} and reuse this var in the test method. # We should increase sleep time ({{Thread.sleep(10000);}}) in the test, for example use {{10000 + 1000}}. There will be some delay that lease manager starts monitor runnable and sleep for preparing to release lease. This was actually the problem I found in HDFS-12675. # Can you add an additional check {{thrown.expect(LeaseNotFoundException.class);}} ? # The following lines don't executes in test. {code} BlockContainerInfo deletingContainer = mapping.getStateManager() .getMatchingContainer( 0, containerInfo.getOwner(), containerInfo.getPipeline().getType(), containerInfo.getPipeline().getFactor(), OzoneProtos.LifeCycleState.DELETING); Assert.assertEquals(containerInfo.getContainerName(), deletingContainer.getContainerName()); {code} > Ozone: SCM: Lease support for container creation > ------------------------------------------------ > > Key: HDFS-12680 > URL: https://issues.apache.org/jira/browse/HDFS-12680 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: ozone > Reporter: Nanda kumar > Assignee: Nanda kumar > Labels: ozoneMerge > Attachments: HDFS-12680-HDFS-7240.000.patch > > > This brings in lease support for container creation. > Lease should be give for a container that is moved to {{CREATING}} state when > {{BEGIN_CREATE}} event happens, {{LeaseException}} should be thrown if the > container already holds a lease. Lease must be released during > {{COMPLETE_CREATE}} event. If the lease times out container should be moved > to {{DELETING}} state, and exception should be thrown if {{COMPLETE_CREATE}} > event is received on that container. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org