public final class ArchiveUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ArchiveUtils.HarPathHelper
HarPathHelper helps to create har:/ URIs for locations inside of archive.
|
static class |
ArchiveUtils.PartSpecInfo
PartSpecInfo keeps fields and values extracted from partial partition info
which is prefix of the full info.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ARCHIVING_LEVEL |
| Constructor and Description |
|---|
ArchiveUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
addSlash(String s) |
static URI |
addSlash(URI u)
Makes sure, that URI points to directory by adding slash to it.
|
static String |
conflictingArchiveNameOrNull(Hive db,
Table tbl,
LinkedHashMap<String,String> partSpec)
Determines if one can insert into partition(s), or there's a conflict with
archive.
|
static int |
getArchivingLevel(Partition p)
Returns archiving level, which is how many fields were set in partial
specification ARCHIVE was run for
|
static String |
getPartialName(Partition p,
int level)
Get a prefix of the given parition's string representation.
|
static boolean |
isArchived(Partition p)
Determines whether a partition has been archived
|
public static final String ARCHIVING_LEVEL
public static URI addSlash(URI u) throws HiveException
HiveExceptionpublic static boolean isArchived(Partition p)
p - public static int getArchivingLevel(Partition p) throws HiveException
HiveExceptionpublic static String getPartialName(Partition p, int level) throws HiveException
p - partition objectlevel - level for prefix depthHiveExceptionpublic static String conflictingArchiveNameOrNull(Hive db, Table tbl, LinkedHashMap<String,String> partSpec) throws HiveException
db - - Hive objecttbl - - table where partition ispartSpec - - partition specification with possible nulls in case of
dynamic partiton insertsHiveExceptionCopyright © 2019 The Apache Software Foundation. All Rights Reserved.