| 216 | } |
| 217 | |
| 218 | public static class SchemaLoader extends PigStorage implements LoadMetadata { |
| 219 | |
| 220 | Schema schema; |
| 221 | |
| 222 | public SchemaLoader(String schemaString) throws ParserException { |
| 223 | schema = Utils.getSchemaFromString(schemaString); |
| 224 | } |
| 225 | |
| 226 | @Override |
| 227 | public ResourceSchema getSchema(String location, Job job) |
| 228 | throws IOException { |
| 229 | return new ResourceSchema(schema); |
| 230 | } |
| 231 | |
| 232 | @Override |
| 233 | public ResourceStatistics getStatistics(String location, Job job) |
| 234 | throws IOException { |
| 235 | return null; |
| 236 | } |
| 237 | |
| 238 | @Override |
| 239 | public String[] getPartitionKeys(String location, Job job) |
| 240 | throws IOException { |
| 241 | return null; |
| 242 | } |
| 243 | |
| 244 | @Override |
| 245 | public void setPartitionFilter(Expression partitionFilter) |
| 246 | throws IOException { |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | @Test |
| 251 | public void testLoaderWithSchema() throws Exception { |
nothing calls this directly
no outgoing calls
no test coverage detected