/** * Create a new tuple schema according one array: the type of fields, the * tuple name is t, and the bag name is b. * * @param dataTypes * @return bag schema * @throws FrontendException */ public static Schema newBagSchema(Byte[] dataTypes) throws FrontendException { return newBagSchema(Arrays.asList(dataTypes)); }
public static Schema newBagSchema(String bagName, String tupleName, String[] fieldNames, Byte[] dataTypes) throws FrontendException { return newBagSchema(bagName, tupleName, Arrays.asList(fieldNames), Arrays.asList(dataTypes)); }
/** * Create a new tuple schema according two arrays: names of field,types of * fields. The default tuple name is t, and the bag is b. * * @param names * @param dataTypes * @return bag schema * @throws FrontendException */ public static Schema newBagSchema(String[] names, Byte[] dataTypes) throws FrontendException { return newBagSchema(Arrays.asList(names), Arrays.asList(dataTypes)); }
/** * Create a new tuple schema according one list: types of fields, the * default names of fields are f0,f1,f2..., and the tuple is t, the bag name * is b. * * @param dataTypes * @return bag schema * @throws FrontendException */ public static Schema newBagSchema(List<Byte> dataTypes) throws FrontendException { List<String> names = newNames(dataTypes.size()); return newBagSchema(names, dataTypes); }