Class GlueUtils


  • public class GlueUtils
    extends java.lang.Object
    Glue utils.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String makePartitionName​(java.util.List<com.amazonaws.services.glue.model.Column> columns, java.util.List<java.lang.String> partitionValues)
      Align to hive makePartName, convert glue partition information to alluxio partition name.
      static java.lang.String makePartName​(java.util.List<java.lang.String> partCols, java.util.List<java.lang.String> vals)
      Make partition name for glue, wrapper of hive makePartName.
      static alluxio.grpc.table.ColumnStatisticsInfo toProto​(com.amazonaws.services.glue.model.ColumnStatistics glueColumnStatistic)
      Convert glue ColumnStatistics to Alluxio ColumnStatisticsInfo.
      static alluxio.grpc.table.layout.hive.Storage toProto​(com.amazonaws.services.glue.model.StorageDescriptor sd, alluxio.table.common.udb.PathTranslator translator)
      Convert the Glue Storage Descriptor and Translator information to Storage.
      static java.util.List<alluxio.grpc.table.FieldSchema> toProto​(java.util.List<com.amazonaws.services.glue.model.Column> glueCloumns)
      Convert the Glue FieldSchema to Alluxio FieldSchema.
      static alluxio.grpc.table.Schema toProtoSchema​(java.util.List<com.amazonaws.services.glue.model.Column> glueColumns)
      Convert glue field schema to alluxio proto (Glue do not have filedschema api).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toProtoSchema

        public static alluxio.grpc.table.Schema toProtoSchema​(java.util.List<com.amazonaws.services.glue.model.Column> glueColumns)
        Convert glue field schema to alluxio proto (Glue do not have filedschema api).
        Parameters:
        glueColumns - list of glue columns
        Returns:
        alluxio proto of schema
      • toProto

        public static java.util.List<alluxio.grpc.table.FieldSchema> toProto​(java.util.List<com.amazonaws.services.glue.model.Column> glueCloumns)
        Convert the Glue FieldSchema to Alluxio FieldSchema.
        Parameters:
        glueCloumns - Glue FiledSchema
        Returns:
        list of Alluxio FieldSchema
      • toProto

        public static alluxio.grpc.table.ColumnStatisticsInfo toProto​(com.amazonaws.services.glue.model.ColumnStatistics glueColumnStatistic)
        Convert glue ColumnStatistics to Alluxio ColumnStatisticsInfo.
        Parameters:
        glueColumnStatistic - glue column statistic info
        Returns:
        Alluxio ColumnStatisticsInfo
      • toProto

        public static alluxio.grpc.table.layout.hive.Storage toProto​(com.amazonaws.services.glue.model.StorageDescriptor sd,
                                                                     alluxio.table.common.udb.PathTranslator translator)
                                                              throws java.io.IOException
        Convert the Glue Storage Descriptor and Translator information to Storage.
        Parameters:
        sd - the glue storage descriptor
        translator - the glue translator
        Returns:
        storage proto
        Throws:
        java.io.IOException
      • makePartitionName

        public static java.lang.String makePartitionName​(java.util.List<com.amazonaws.services.glue.model.Column> columns,
                                                         java.util.List<java.lang.String> partitionValues)
                                                  throws java.io.IOException
        Align to hive makePartName, convert glue partition information to alluxio partition name.
        Parameters:
        columns - glue table partition keys
        partitionValues - glue partition values
        Returns:
        partition name
        Throws:
        java.io.IOException
      • makePartName

        public static java.lang.String makePartName​(java.util.List<java.lang.String> partCols,
                                                    java.util.List<java.lang.String> vals)
        Make partition name for glue, wrapper of hive makePartName.
        Parameters:
        partCols - partition columns
        vals - partition values
        Returns:
        partition name