Class HiveWriteUtils

java.lang.Object
io.trino.plugin.hive.util.HiveWriteUtils

public final class HiveWriteUtils extends Object
  • Method Details

    • createPartitionValues

      public static List<String> createPartitionValues(List<Type> partitionColumnTypes, Page partitionColumns, int position)
    • checkTableIsWritable

      public static void checkTableIsWritable(Table table, boolean writesToNonManagedTablesEnabled)
    • checkPartitionIsWritable

      public static void checkPartitionIsWritable(String partitionName, Partition partition)
    • getTableDefaultLocation

      public static Location getTableDefaultLocation(HdfsContext context, SemiTransactionalHiveMetastore metastore, HdfsEnvironment hdfsEnvironment, String schemaName, String tableName)
    • getTableDefaultLocation

      public static Location getTableDefaultLocation(Database database, HdfsContext context, HdfsEnvironment hdfsEnvironment, String schemaName, String tableName)
    • pathExists

      public static boolean pathExists(HdfsContext context, HdfsEnvironment hdfsEnvironment, org.apache.hadoop.fs.Path path)
    • isS3FileSystem

      public static boolean isS3FileSystem(HdfsContext context, HdfsEnvironment hdfsEnvironment, org.apache.hadoop.fs.Path path)
    • isViewFileSystem

      public static boolean isViewFileSystem(HdfsContext context, HdfsEnvironment hdfsEnvironment, org.apache.hadoop.fs.Path path)
    • isHdfsEncrypted

      public static boolean isHdfsEncrypted(HdfsContext context, HdfsEnvironment hdfsEnvironment, org.apache.hadoop.fs.Path path)
    • isFileCreatedByQuery

      public static boolean isFileCreatedByQuery(String fileName, String queryId)
    • createTemporaryPath

      public static Location createTemporaryPath(HdfsContext context, HdfsEnvironment hdfsEnvironment, org.apache.hadoop.fs.Path targetPath, String temporaryStagingDirectoryPath)
    • createDirectory

      public static void createDirectory(HdfsContext context, HdfsEnvironment hdfsEnvironment, org.apache.hadoop.fs.Path path)
    • checkedDelete

      public static void checkedDelete(org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.fs.Path file, boolean recursive) throws IOException
      Throws:
      IOException
    • isWritableType

      public static boolean isWritableType(HiveType hiveType)