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

[jira] [Created] (HBASE-4175) Fix FSUtils.createTableDescriptor()

Fix FSUtils.createTableDescriptor()
-----------------------------------

                 Key: HBASE-4175
                 URL: https://issues.apache.org/jira/browse/HBASE-4175
             Project: HBase
          Issue Type: Bug
    Affects Versions: 0.92.0
            Reporter: Ted Yu


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.

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

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Status: Patch Available  (was: Open)

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch, HBASE-4175_3.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

stack commented on HBASE-4175:
------------------------------

+1

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch, HBASE-4175_3.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Ted Yu commented on HBASE-4175:
-------------------------------

HBASE-4175_1.patch looks good overall.
In createTableDescriptor(FileSystem fs, ...) the catch block seems unnecessary:
{code}
+    } catch (IOException ioe) {
       LOG.info("IOException while trying to create tableInfo in HDFS", ioe);
+      throw ioe;
{code}


> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Ted Yu commented on HBASE-4175:
-------------------------------

+1 on HBASE-4175_2_without catch block.patch

Minor comment, the second F in ForceFul should be lower cased:
{code}
+  public void testShouldAllowForceFulCreationOfAlreadyExistingTableDescriptor()
{code}

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan commented on HBASE-4175:
-----------------------------------------------

@Ted,
I was anlysing the createTableDescriptor() api.  We will be needing a return type to know whether table creating was successful or not.
{noformat}
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.
{noformat}
Once we return a boolean to say whether table creation is successful or not
is there any way to get the same table with same descriptor details. Because we say TableAlreadyExists if we try getting the same table creation command.

Pls correct me on my understanding if am wrong.  And if you could give me more clarity to proceed on the defect.

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Ted Yu commented on HBASE-4175:
-------------------------------

For FAIL_DUE_TO_IOE, it would be useful to expose the IOE.
Tracing usage of createTableDescriptor(), I see that MasterFileSystem.createTableDescriptor() doesn't declare to throw IOE. But the only reference is MetaEditor.updateMetaWithNewRegionInfo() which throws IOException:
{code}
        masterServices.getMasterFileSystem().createTableDescriptor(hrfm.getTableDesc());
{code}
So we can still return boolean from FSUtils.createTableDescriptor() and let it throw IOE.

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Ted Yu commented on HBASE-4175:
-------------------------------

+1 on HBASE-4175_3.patch

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch, HBASE-4175_3.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Assigned] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan reassigned HBASE-4175:
---------------------------------------------

    Assignee: ramkrishna.s.vasudevan

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Hudson commented on HBASE-4175:
-------------------------------

Integrated in HBase-TRUNK #2124 (See [https://builds.apache.org/job/HBase-TRUNK/2124/])
    HBASE-4175 Fix FSUtils.createTableDescriptor()

tedyu : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestFSTableDescriptorForceCreation.java


> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch, HBASE-4175_3.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Status: Patch Available  (was: Open)

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Status: Patch Available  (was: Open)

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Attachment: HBASE-4175.patch

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Ted Yu commented on HBASE-4175:
-------------------------------

>From FSTableDescriptors.get():
{code}
    if (htd == null) {
      // More likely is above will throw a FileNotFoundException
      throw new TableExistsException("No descriptor for " + tablename);
    }
{code}
So we can retrieve the same descriptor if it does exist.

I think createTableDescriptor() should return an enum which contains the following:
FAIL_DUE_TO_IOE, FAIL_ALREADY_EXISTS, SUCCESS



> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Ted Yu updated HBASE-4175:
--------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch, HBASE-4175_3.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Status: Open  (was: Patch Available)

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Attachment: HBASE-4175_3.patch

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch, HBASE-4175_3.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Attachment: HBASE-4175_2_without catch block.patch

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Status: Open  (was: Patch Available)

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan commented on HBASE-4175:
-----------------------------------------------

@Ted
Thanks for your review.

Resubmitted the patch with the mentioned change.

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch, HBASE-4175_3.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Ted Yu commented on HBASE-4175:
-------------------------------

We should add boolean parameter, force, to FSUtils.createTableDescriptor().
If the table already exists and force parameter is false, FSUtils.createTableDescriptor() can simply return false.

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Attachment: HBASE-4175_2_with catch block.patch

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Updated] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan updated HBASE-4175:
------------------------------------------

    Attachment: HBASE-4175_1.patch

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

Ted Yu commented on HBASE-4175:
-------------------------------

Integrated to TRUNK.

Thanks for the patch Ramkrishna.

Thanks for the review Stack.

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch, HBASE-4175_3.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan commented on HBASE-4175:
-----------------------------------------------

@Ted,
Actually there were 2 catch blocks with the same content.
I removed the first one that comes in 
createTableDescriptor(HTableDescriptor htableDescriptor, Configuration conf,
      boolean forceCreation)
but did not remove it from 
createTableDescriptor(FileSystem fs, Path rootdir,    HTableDescriptor htableDescriptor, boolean forceCreation)
-> This is because there are scenarios where we can directly use the second api for createTableDescriptor(In testcases it is getting used directly).  So we need some mechanism to know what exception has come.

If we use the first createTableDescriptor() it is any way calling the second one so the catch block is not needed.
Is it ok Ted?

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan commented on HBASE-4175:
-----------------------------------------------

Thanks for your review Stack and Ted.
@Stack
Yes i could have done that.  Next time will not repeat this. :)
Will resubmit with the changes as you have suggested.

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

stack commented on HBASE-4175:
------------------------------

Patch looks generally good to me.  You might fix some javadoc if you make another patch version and add doc'ing of the new boolean return.  In future, you might add override that doesn't take the boolean which defaults to 'false' then you would have had less code to change.  Good stuff Ram.

> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan commented on HBASE-4175:
-----------------------------------------------

I have submitted two versions.  One with catch block and without catch block. Catch block i have mainly used for logging at one place and also limited the number of changes through default apis.


> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-4175.patch, HBASE-4175_1.patch, HBASE-4175_2_with catch block.patch, HBASE-4175_2_without catch block.patch
>
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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

        

[jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor()

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

ramkrishna.s.vasudevan commented on HBASE-4175:
-----------------------------------------------

@Ted,
Currently as you mentioned FSUtils.createTableDescriptor() doesnot throw IOE.  So I will make it throw IOE.  
Reg if the table already exists there is a check 
{code}
     if (fs.exists(tableInfoPath)
          && fs.getFileStatus(tableInfoPath).getLen() > 0) {
        LOG.info("TableInfo already exists.. Skipping creation");
}
{code}

So we need not add any FSTableDescriptor.get() I think. Pls suggest.

Also what should be the behaviour if the table already exists.  As you had already told do we need to forcefully create? So for that we need to introduce a new api for forceful creation. 
In my current patch I am planning to return true or false and if IOE happens will throw the IOE to the caller.



> Fix FSUtils.createTableDescriptor()
> -----------------------------------
>
>                 Key: HBASE-4175
>                 URL: https://issues.apache.org/jira/browse/HBASE-4175
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Ted Yu
>            Assignee: ramkrishna.s.vasudevan
>
> 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.
> Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten.

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