Package org.apache.tajo.catalog.exception

Examples of org.apache.tajo.catalog.exception.CatalogException


          throw new HCatException("Tajo cannot support struct field type.");
        case MAP:
          throw new HCatException("Tajo cannot support map field type.");
      }
    } catch (HCatException e) {
      throw new CatalogException("incompatible hcatalog types when assigning to tajo type. - " +
          "HCatFieldSchema:" + fieldSchema);
    }
  }
View Full Code Here


      typeStr = "BLOB";

    try {
      return Enum.valueOf(TajoDataTypes.Type.class, typeStr);
    } catch (IllegalArgumentException iae) {
      throw new CatalogException("Cannot find a matched type aginst from '" + typeStr + "'");
    }
  }
View Full Code Here

    case VARBINARY: return serdeConstants.BINARY_TYPE_NAME;
    case BLOB: return serdeConstants.BINARY_TYPE_NAME;
    case DATE: return serdeConstants.DATE_TYPE_NAME;
    case TIMESTAMP: return serdeConstants.TIMESTAMP_TYPE_NAME;
    default:
      throw new CatalogException(dataType + " is not supported.");
    }
  }
View Full Code Here

  public static String getStoreType(String fileFormat) {
    Preconditions.checkNotNull(fileFormat);

    String[] fileFormatArrary = fileFormat.split("\\.");
    if(fileFormatArrary.length < 1) {
      throw new CatalogException("Hive file output format is wrong. - file output format:" + fileFormat);
    }

    String outputFormatClass = fileFormatArrary[fileFormatArrary.length-1];
    if(outputFormatClass.equals(HiveIgnoreKeyTextOutputFormat.class.getSimpleName())) {
      return CatalogProtos.StoreType.CSV.name();
    } else if(outputFormatClass.equals(HiveSequenceFileOutputFormat.class.getSimpleName())) {
      return CatalogProtos.StoreType.SEQUENCEFILE.name();
    } else if(outputFormatClass.equals(RCFileOutputFormat.class.getSimpleName())) {
        return CatalogProtos.StoreType.RCFILE.name();
    } else {
      throw new CatalogException("Not supported file output format. - file output format:" + fileFormat);
    }
  }
View Full Code Here

    conf.setVar(TajoConf.ConfVars.CATALOG_ADDRESS, "127.0.0.1:0");

    // MySQLStore requires password
    if (driverClass.equals(MySQLStore.class.getCanonicalName())) {
      if (connectionId == null) {
        throw new CatalogException(String.format("%s driver requires %s", driverClass, CatalogConstants.CONNECTION_ID));
      }
      conf.set(CatalogConstants.CONNECTION_ID, connectionId);
      if (password != null) {
        conf.set(CatalogConstants.CONNECTION_PASSWORD, password);
      }
View Full Code Here

      }

      insertSchemaVersion();

    } catch (SQLException se) {
      throw new CatalogException("failed to create base tables for Derby catalog store.", se);
    } finally {
      CatalogUtil.closeQuietly(stmt);
    }
  }
View Full Code Here

      for(String tableName : droppedTable.keySet()) {
        LOG.info("Table '" + tableName + "' is dropped");
      }
    } catch (SQLException se) {
      throw new CatalogException(se);
    } finally {
      CatalogUtil.closeQuietly(stmt);
    }
  }
View Full Code Here

      while (res.next()) {
        baseTableMaps.put(res.getString("TABLE_NAME"), true);
      }
    } catch (SQLException se){
      throw  new CatalogException(se);
    } finally {
      CatalogUtil.closeQuietly(res);
    }

    for(Map.Entry<String, Boolean> entry : baseTableMaps.entrySet()) {
View Full Code Here

      }

      insertSchemaVersion();

    } catch (SQLException se) {
      throw new CatalogException("failed to create base tables for MySQL catalog store", se);
    } finally {
      CatalogUtil.closeQuietly(stmt);
    }
  }
View Full Code Here

      for(String tableName : droppedTable.keySet()) {
        LOG.info("Table '" + tableName + "' is dropped");
      }
    } catch (SQLException se) {
      throw new CatalogException(se);
    } finally {
      CatalogUtil.closeQuietly(stmt);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.catalog.exception.CatalogException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.