public class TfMetaUtils extends Object
| Constructor and Description | 
|---|
TfMetaUtils()  | 
| Modifier and Type | Method and Description | 
|---|---|
static boolean | 
containsOmitSpec(String spec,
                String[] colnames)  | 
static long | 
getK(org.apache.wink.json4j.JSONObject parsedSpec)
Get K value used for calculation during feature hashing from parsed specifications. 
 | 
static boolean | 
isIDSpec(org.apache.wink.json4j.JSONObject spec)  | 
static boolean | 
isIDSpec(String spec)  | 
static List<Integer> | 
parseBinningColIDs(org.apache.wink.json4j.JSONObject jSpec,
                  String[] colnames,
                  int minCol,
                  int maxCol)  | 
static List<Integer> | 
parseBinningColIDs(String spec,
                  String[] colnames,
                  int minCol,
                  int maxCol)  | 
static int[] | 
parseJsonIDList(org.apache.wink.json4j.JSONObject spec,
               String[] colnames,
               String group)
TODO consolidate external and internal json spec definitions 
 | 
static int[] | 
parseJsonIDList(org.apache.wink.json4j.JSONObject spec,
               String[] colnames,
               String group,
               int minCol,
               int maxCol)  | 
static int[] | 
parseJsonIDList(String spec,
               String[] colnames,
               String group)  | 
static int | 
parseJsonObjectID(org.apache.wink.json4j.JSONObject colspec,
                 String[] colnames,
                 int minCol,
                 int maxCol,
                 boolean ids)  | 
static int[] | 
parseJsonObjectIDList(org.apache.wink.json4j.JSONObject spec,
                     String[] colnames,
                     String group,
                     int minCol,
                     int maxCol)  | 
static FrameBlock | 
readTransformMetaDataFromFile(String spec,
                             String metapath,
                             String colDelim)
Reads transform meta data from an HDFS file path and converts it into an in-memory
 FrameBlock object. 
 | 
static FrameBlock | 
readTransformMetaDataFromPath(String spec,
                             String metapath,
                             String colDelim)
Reads transform meta data from the class path and converts it into an in-memory
 FrameBlock object. 
 | 
public static boolean isIDSpec(String spec)
public static boolean isIDSpec(org.apache.wink.json4j.JSONObject spec)
                        throws org.apache.wink.json4j.JSONException
org.apache.wink.json4j.JSONExceptionpublic static int[] parseJsonIDList(org.apache.wink.json4j.JSONObject spec,
                                    String[] colnames,
                                    String group)
                             throws org.apache.wink.json4j.JSONException
spec - transform specification as json stringcolnames - column namesgroup - attribute name in json classorg.apache.wink.json4j.JSONException - if JSONException occurspublic static int[] parseJsonIDList(org.apache.wink.json4j.JSONObject spec,
                                    String[] colnames,
                                    String group,
                                    int minCol,
                                    int maxCol)
                             throws org.apache.wink.json4j.JSONException
spec - transform specification as json stringcolnames - column namesgroup - attribute name in json classminCol - start of columns to ignore (1-based, inclusive, if -1 not used)maxCol - end of columns to ignore (1-based, exclusive, if -1 not used)org.apache.wink.json4j.JSONException - if JSONException occurspublic static int parseJsonObjectID(org.apache.wink.json4j.JSONObject colspec,
                                    String[] colnames,
                                    int minCol,
                                    int maxCol,
                                    boolean ids)
                             throws org.apache.wink.json4j.JSONException
org.apache.wink.json4j.JSONExceptionpublic static int[] parseJsonObjectIDList(org.apache.wink.json4j.JSONObject spec,
                                          String[] colnames,
                                          String group,
                                          int minCol,
                                          int maxCol)
                                   throws org.apache.wink.json4j.JSONException
org.apache.wink.json4j.JSONExceptionpublic static long getK(org.apache.wink.json4j.JSONObject parsedSpec)
                 throws org.apache.wink.json4j.JSONException
parsedSpec - parsed specificationsorg.apache.wink.json4j.JSONException - if JSONException occurspublic static FrameBlock readTransformMetaDataFromFile(String spec, String metapath, String colDelim) throws IOException
spec - transform specification as json stringmetapath - hdfs file path to meta data directorycolDelim - separator for processing column names in the meta data file 'column.names'IOException - if IOException occurspublic static FrameBlock readTransformMetaDataFromPath(String spec, String metapath, String colDelim) throws IOException
spec - transform specification as json stringmetapath - resource path to meta data directorycolDelim - separator for processing column names in the meta data file 'column.names'IOException - if IOException occurspublic static List<Integer> parseBinningColIDs(String spec, String[] colnames, int minCol, int maxCol) throws IOException
IOExceptionpublic static List<Integer> parseBinningColIDs(org.apache.wink.json4j.JSONObject jSpec, String[] colnames, int minCol, int maxCol) throws IOException
IOExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.