You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Mikhail Bautin (JIRA)" <ji...@apache.org> on 2011/08/04 02:05:31 UTC

[jira] [Created] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
---------------------------------------------------------------------------------------

                 Key: HBASE-4162
                 URL: https://issues.apache.org/jira/browse/HBASE-4162
             Project: HBase
          Issue Type: Test
    Affects Versions: 0.92.0, 0.94.0
            Reporter: Mikhail Bautin
            Assignee: Mikhail Bautin
            Priority: Minor
             Fix For: 0.92.0, 0.94.0


Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-4162:
--------------------------

    Attachment: 4162.txt

This is the patch I plan to commit.
Ran through all tests. Build was successful.

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Mikhail Bautin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Bautin updated HBASE-4162:
----------------------------------

    Attachment: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Mikhail Bautin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079149#comment-13079149 ] 

Mikhail Bautin commented on HBASE-4162:
---------------------------------------

Posted another version of the patch to https://reviews.apache.org/r/1281/diff/2/raw/.

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-4162:
--------------------------

    Attachment: 4162.txt

Added note to javadoc for FSUtils.createTableDescriptor()

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079370#comment-13079370 ] 

Ted Yu commented on HBASE-4162:
-------------------------------

Looking at the classes that call FSUtils.createTableDescriptor(), I see:
1. HMaster.createTable()
2. MetaEditor.updateMetaWithNewRegionInfo() is used in migrating old style HRegionInfo090x
We can update javadoc for FSUtils.createTableDescriptor() to emphasize this behavior.

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack resolved HBASE-4162.
--------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.94.0)
     Hadoop Flags: [Reviewed]

Committed TRUNK.  Thanks for patches Mikhail (and Ted).

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Mikhail Bautin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079249#comment-13079249 ] 

Mikhail Bautin commented on HBASE-4162:
---------------------------------------

Is it a good idea to be aggressive about deleting tables if they already exist? If this function is used in production, this could result in a data loss if something goes wrong.

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080473#comment-13080473 ] 

stack commented on HBASE-4162:
------------------------------

I prefer Mikhail's patch where delete only happens when testing, not indiscriminately as per Ted patch (I was going to say that we shouldn't be using /tmp at all and I went to go fix this by trying to home the test on the HBaseTestingUtility.getTestDir which works fine writing the .tableinfo but then when we go to get the .tableinfo, we are making a new Configuration -- this is using defaults and therefore /tmp).

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-4162:
--------------------------

    Attachment:     (was: 4162.txt)

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080517#comment-13080517 ] 

Ted Yu commented on HBASE-4162:
-------------------------------

Currently createTableDescriptor() doesn't return anything.
The caller wouldn't know whether the descriptor is created or not. See exception handling:
{code}
    } catch(IOException ioe) {
      LOG.info("IOException while trying to create tableInfo in HDFS", ioe);
    }
{code}
We should return a boolean.

If the table descriptor exists already, maybe we should deserialize from hdfs and compare with htableDescriptor argument. If they differ, I am not sure what the proper action would be.

As I said in my comment @ 04/Aug/11 13:15, I didn't see how table descriptor for the same table would exist prior to calling createTableDescriptor().

If the user happens to call createTableDescriptor() twice, I am not sure how bad overwriting the first one would be.

Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080554#comment-13080554 ] 

Hudson commented on HBASE-4162:
-------------------------------

Integrated in HBase-TRUNK #2091 (See [https://builds.apache.org/job/HBase-TRUNK/2091/])
    HBASE-4162 Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.

stack : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java


> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "Mikhail Bautin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Bautin updated HBASE-4162:
----------------------------------

    Attachment: 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4162) Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase- if it already exists.

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080542#comment-13080542 ] 

stack commented on HBASE-4162:
------------------------------

@Ted All of your above is good.  Seems like it should be in a different issue though ("Fix createTableDescriptor' -- do you want to create it and copy your comment there?).  Let me commit Mikhails' fix for the failing test. Then we are down to a lone failing test on TRUNK.

> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-4162
>                 URL: https://issues.apache.org/jira/browse/HBASE-4162
>             Project: HBase
>          Issue Type: Test
>    Affects Versions: 0.92.0, 0.94.0
>            Reporter: Mikhail Bautin
>            Assignee: Mikhail Bautin
>            Priority: Minor
>              Labels: test-patch
>             Fix For: 0.92.0, 0.94.0
>
>         Attachments: 0001-Fixing-TestHRegionInfo.testGetSetOfHTD-by-removing-t.patch, 0001-rev-2-of-fixing-TestHRegionInfo.testGetSetOfHTD-by-r.patch, 4162.txt
>
>
> Fix TestHRegionInfo.testGetSetOfHTD: delete /tmp/hbase-<username> if it already exists. Otherwise, the directory is not created and the unit test fails trying to compare stale data from the previous test run to what it expects to be there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira