JindoTable allows you to run the archiveTable and unarchiveTable commands to archive and unarchive tables or partitions in Object Storage Service (OSS). This topic describes the archiveTable and unarchiveTable commands.
Limits
This topic is suitable only for scenarios in which a Hive metastore is used to store metadata.
archiveTable
You can use the archiveTable
command to archive tables or partitions in OSS.
Obtain help information
Run the following command to obtain help information:
jindotable -help archiveTable
Parameter description
jindotable -archiveTable -t <dbName.tableName> -i/-a/-ca [-c "<condition>" | -fullTable] [-b/-before <before days>] [-p/-parallel <parallelism>] [-mr/-mapReduce] [-e/-explain] [-w/-workingDir <working directory>][-l/-logDir <log directory>]
Parameter | Description | Required |
| The name of the table that you want to archive. You must configure this parameter in the
| Yes |
| The storage class in which you want to archive data. You can use one of the following options to specify a storage class:
| Yes |
| You must configure either
| No |
| Only the tables or partitions that were created at least the specified days ago can be archived. | No |
| The parallelism of archive operations. | No |
| Hadoop MapReduce instead of local multithreading is used to archive data. | No |
| The explain mode is used. In explain mode, the list of partitions to be archived is displayed, but no data is archived. | No |
| The working directory of a MapReduce job. This option is used only when you run a MapReduce job. The directory can be left empty or not. Temporary files are created when you run the MapReduce job and are automatically deleted after the job is complete. | No |
| The directory in which log files are stored. | No |
unarchiveTable
You can use the unarchiveTable
command to unarchive tables or partitions in OSS.
Obtain help information
Run the following command to obtain help information:
jindotable -help unarchiveTable
Parameter description
jindotable -unarchiveTable -t <dbName.tableName> [-i/-a/-o/-cr] [-notWait] [-c "<condition>" | -fullTable] [-d/-restoreDays <restore days>] [-b/-before <before days>] [-p/-parallel <parallelism>] [-mr/-mapReduce] [-e/-explain] [-w/-workingDir <working directory>][-l/-logDir <log directory>]
Parameter | Description | Required |
| The name of the table that you want to unarchive. You must configure this parameter in the Database name.Table name format. Separate the database name and table name with a period (.). The table can be a partitioned table or a non-partitioned table. | Yes |
| If you do not configure this parameter, the storage class of the data that you want to unarchive is changed to Standard. You can use one of the following options to specify a storage class:
| No |
| This parameter is valid only when you unarchive data. If you configure this parameter, the system exits the current process without waiting for the completion of the unarchive operation performed by the OSS server. If you do not configure this parameter, the system exits the current process after the unarchive operation is complete or times out. The timeout period is 10 minutes. | No |
| You must configure either
| No |
| The number of days to retain the unarchive state when you perform only the unarchive operation. The default value is one day. For example, this parameter takes effect if you use the -o option to perform only the unarchive operation on tables that are stored to Cold Archive storage. This parameter takes effect in the intermediate stage when the storage class of a table that is never unarchived is changed from Archive or Cold Archive to Standard. This parameter does not take effect when the storage class of a table is changed from IA to Standard. | No |
| Only the tables or partitions that were created at least the specified days ago can be unarchived. | No |
| The parallelism of unarchive operations. | No |
| Hadoop MapReduce instead of local multithreading is used to unarchive data. | No |
| The explain mode is used. In explain mode, the list of partitions to be unarchived is displayed, but no data is unarchived. | No |
| The working directory of a MapReduce job. This option is used only when you run a MapReduce job. The directory can be left empty or not. Temporary files are created when you run the MapReduce job and are automatically deleted after the job is complete. | No |
| The directory in which log files are stored. | No |