+ "merged schema: (" + mergedSchema + ")" + " of schemas : " + mergedSchemas; SchemaMergeException sme = new SchemaMergeException(msg, e.getErrorCode(), e); sme.setMarkedAsShowToUser(true); throw sme;
private static void checkNullAlias(FieldSchema fs, Schema schema) throws SchemaMergeException { if(fs.alias == null){ throw new SchemaMergeException( "Schema having field with null alias cannot be merged " + "using alias. Schema :" + schema, 1126 ); } }
/** * Utility function that calls schema.getFiled(alias), and converts * {@link FrontendException} to {@link SchemaMergeException} * @param schema * @param alias * @return FieldSchema * @throws SchemaMergeException */ private static FieldSchema getFieldSubNameMatchThrowSchemaMergeException( Schema schema, String alias) throws SchemaMergeException { FieldSchema fs = null; try { fs = schema.getFieldSubNameMatch(alias); } catch (FrontendException e) { String msg = "Caught exception finding FieldSchema for alias " + alias; throw new SchemaMergeException(msg, e.getErrorCode(), e); } return fs; }
String msg = "Incompatible types for merging schemas. Field schema: " + fs1 + " Other field schema: " + fs2; throw new SchemaMergeException(msg, errCode, PigException.INPUT) ; String msg = "Incompatible types for merging inner schemas of " + " Field schema type: " + fs1 + " Other field schema type: " + fs2; throw new SchemaMergeException(msg, errCode, PigException.INPUT) ; throw new SchemaMergeException( "Error in creating fieldSchema", errCode,
int errCode = 1033; String msg = "Schema size mismatch for merging schemas. Other schema size greater than schema size. Schema: " + this + ". Other schema: " + other; throw new SchemaMergeException(msg, errCode, PigException.INPUT); int errCode = 1023; String msg = "Unable to create field schema."; throw new SchemaMergeException(msg, errCode, PigException.INPUT, fee);
int errCode = 1029; String msg = "One of the schemas is null for merging schemas. Schema: " + schema + " Other schema: " + other; throw new SchemaMergeException(msg, errCode, PigException.INPUT) ; int errCode = 1029; String msg = "One of the schemas is null for merging schemas. Schema: " + schema + " Other schema: " + other; throw new SchemaMergeException(msg, errCode, PigException.INPUT) ; int errCode = 1030; String msg = "Different schema sizes for merging schemas. Schema size: " + schema.size() + " Other schema size: " + other.size(); throw new SchemaMergeException(msg, errCode, PigException.INPUT) ; + DataType.findTypeName(myFs.type) + " Other field schema type: " + DataType.findTypeName(otherFs.type); throw new SchemaMergeException(msg, errCode, PigException.INPUT) ; int errCode = 2124; String errMsg = "Internal Error: Unexpected error creating field schema"; throw new SchemaMergeException(errMsg, errCode, PigException.BUG, e); int errCode = 2124; String errMsg = "Cannot merge schema " + schema + " and " + other + ". One with twoLeverAccess flag, the other doesn't."; throw new SchemaMergeException(errMsg, errCode, PigException.BUG);
int errCode = 1021; String msg = "Type mismatch. No useful type for merging. Field Schema: " + myFs + ". Other Field Schema: " + otherFs; throw new SchemaMergeException(msg, errCode, PigException.INPUT); } else if(myFs.type == otherFs.type) { mergedType = myFs.type; int errCode = 1022; String msg = "Type mismatch for merging schema prefix. Field Schema: " + myFs + ". Other Field Schema: " + otherFs; throw new SchemaMergeException(msg, errCode, PigException.INPUT); int errCode = 1022; String msg = "Type mismatch merging schema prefix. Field Schema: " + myFs + ". Other Field Schema: " + otherFs; throw new SchemaMergeException(msg, errCode, PigException.INPUT); int errCode = 1023; String msg = "Unable to create field schema."; throw new SchemaMergeException(msg, errCode, PigException.BUG, fee);
mergedSchema.add(fs2.clone()); } catch (CloneNotSupportedException e) { throw new SchemaMergeException( "Error encountered while merging schemas", e);