You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by dongjinleekr <gi...@git.apache.org> on 2016/08/21 02:43:06 UTC

[GitHub] tajo pull request #1047: TAJO-2174: Implement HiveCatalogStore#alterTable

GitHub user dongjinleekr opened a pull request:

    https://github.com/apache/tajo/pull/1047

    TAJO-2174: Implement HiveCatalogStore#alterTable

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjinleekr/tajo feature/TAJO-2174

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/1047.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1047
    
----
commit 2904cae98d6c89a61a57b3dba18deb8e3d2ae302
Author: Lee Dongjin <do...@apache.org>
Date:   2016-08-21T00:54:56Z

    Implement HiveCatalogStore#setProperties, unsetProperties

commit ecb47afa6d5a596d15469a0e59b0c955a72f8c7c
Author: Lee Dongjin <do...@apache.org>
Date:   2016-08-21T02:11:06Z

    update testing methods in TestHiveCatalogStore

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo issue #1047: TAJO-2174: Implement HiveCatalogStore#alterTable

Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on the issue:

    https://github.com/apache/tajo/pull/1047
  
    +1 Thank you for your quick fix


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request #1047: TAJO-2174: Implement HiveCatalogStore#alterTable

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/tajo/pull/1047


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo issue #1047: TAJO-2174: Implement HiveCatalogStore#alterTable

Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on the issue:

    https://github.com/apache/tajo/pull/1047
  
    Thank you for contribution!
    Looks good to me!  I left a trivial comment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] tajo pull request #1047: TAJO-2174: Implement HiveCatalogStore#alterTable

Posted by jinossy <gi...@git.apache.org>.
Github user jinossy commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/1047#discussion_r76527398
  
    --- Diff: tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java ---
    @@ -789,6 +793,44 @@ private void dropPartition(String databaseName, String tableName, CatalogProtos.
         }
       }
     
    +  private void setProperties(final String databaseName, final String tableName,
    +                             final PrimitiveProtos.KeyValueSetProto properties) {
    +    HiveCatalogStoreClientPool.HiveCatalogStoreClient client = null;
    +    try {
    +      client = clientPool.getClient();
    +      Table table = client.getHiveClient().getTable(databaseName, tableName);
    +      table.getParameters().putAll(ProtoUtil.convertToMap(properties));
    +	    client.getHiveClient().alter_table(databaseName, tableName, table);
    +    } catch (NoSuchObjectException nsoe) {
    +    } catch (Exception e) {
    +      throw new TajoInternalError(e);
    +    } finally {
    +      if (client != null) {
    +        client.release();
    +      }
    +    }
    +  }
    +
    +  private void unsetProperties(final String databaseName, final String tableName,
    +                               PrimitiveProtos.StringListProto propertyKeys) {
    +    HiveCatalogStoreClientPool.HiveCatalogStoreClient client = null;
    +    try {
    +      client = clientPool.getClient();
    +      Table table = client.getHiveClient().getTable(databaseName, tableName);
    +	    for (String propertyKey : ProtoUtil.convertStrings(propertyKeys)) {
    --- End diff --
    
    please fix indentation


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---