Hive
  1. Hive
  2. HIVE-874

add partitions found during metastore check

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0
    • Fix Version/s: 0.5.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      'msck' just reports the list of partition directories that exist but do not have corresponding metadata. This can happen if a process outside of hive is populating the directories. Hive should support an option to 'msck' that would also add default metadata for these partitions.

      1. HIVE-874.patch
        10 kB
        Cyrus Katrak

        Issue Links

          Activity

          Carl Steinbach made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Carl Steinbach made changes -
          Affects Version/s 0.3.1 [ 12313845 ]
          Zheng Shao made changes -
          Affects Version/s 0.6.0 [ 12314524 ]
          Affects Version/s 0.2.0 [ 12313565 ]
          Zheng Shao made changes -
          Affects Version/s 0.3.2 [ 12314124 ]
          Namit Jain made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Reviewed]
          Fix Version/s 0.5.0 [ 12314156 ]
          Resolution Fixed [ 1 ]
          Hide
          Namit Jain added a comment -

          @Prasad, feel free to open it back if you think the patch needs to be backported to 0.4 also

          Show
          Namit Jain added a comment - @Prasad, feel free to open it back if you think the patch needs to be backported to 0.4 also
          Hide
          Prasad Chakka added a comment -

          committed to trunk. Tahnks Cyrus.

          Show
          Prasad Chakka added a comment - committed to trunk. Tahnks Cyrus.
          Hide
          Prasad Chakka added a comment -

          looks good, will run tests and commit to trunk.

          Show
          Prasad Chakka added a comment - looks good, will run tests and commit to trunk.
          Cyrus Katrak made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Cyrus Katrak added a comment -

          Tests added

          Show
          Cyrus Katrak added a comment - Tests added
          Cyrus Katrak made changes -
          Attachment HIVE-874.patch [ 12422235 ]
          Hide
          Prasad Chakka added a comment -

          HIVE-874 can be used in certain cases where partition directories are created by non-Hive processes.

          Show
          Prasad Chakka added a comment - HIVE-874 can be used in certain cases where partition directories are created by non-Hive processes.
          Prasad Chakka made changes -
          Field Original Value New Value
          Link This issue is related to HIVE-493 [ HIVE-493 ]
          Hide
          Prasad Chakka added a comment -

          Cyrus,

          I created a separate JIRA since HIVE-493 is about automatically inferring partitions during query time and not updating metadata at all. I would like to keep that open since this may not be sufficient for some usecases. Could you upload your patch here?

          As for unit tests, check hive/ql/src/test/queries/clientpositive directory that contains the CLI tests. One of the tests could be to create hdfs directories for a table like 'srcpart' and run 'msck repair' on it and do a 'show partitions' on the table again to see if the partition is listed. We need to have some unit tests so that this functionality will not be broken accidentally by some other check-in.

          Show
          Prasad Chakka added a comment - Cyrus, I created a separate JIRA since HIVE-493 is about automatically inferring partitions during query time and not updating metadata at all. I would like to keep that open since this may not be sufficient for some usecases. Could you upload your patch here? As for unit tests, check hive/ql/src/test/queries/clientpositive directory that contains the CLI tests. One of the tests could be to create hdfs directories for a table like 'srcpart' and run 'msck repair' on it and do a 'show partitions' on the table again to see if the partition is listed. We need to have some unit tests so that this functionality will not be broken accidentally by some other check-in.
          Prasad Chakka created issue -

            People

            • Assignee:
              Cyrus Katrak
              Reporter:
              Prasad Chakka
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development