/** Returns the class of keys in this file. */ public synchronized Class<?> getKeyClass() { if (null == keyClass) { try { keyClass = WritableName.getClass(getKeyClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return keyClass; }
/** Returns the class of values in this file. */ public synchronized Class<?> getValueClass() { if (null == valClass) { try { valClass = WritableName.getClass(getValueClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return valClass; }
/** Returns the class of keys in this file. */ public synchronized Class<?> getKeyClass() { if (null == keyClass) { try { keyClass = WritableName.getClass(getKeyClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return keyClass; }
/** Returns the class of values in this file. */ public synchronized Class<?> getValueClass() { if (null == valClass) { try { valClass = WritableName.getClass(getValueClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return valClass; }
/** Returns the class of keys in this file. */ public synchronized Class<?> getKeyClass() { if (null == keyClass) { try { keyClass = WritableName.getClass(getKeyClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return keyClass; }
/** Returns the class of keys in this file. */ public synchronized Class<?> getKeyClass() { if (null == keyClass) { try { keyClass = WritableName.getClass(getKeyClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return keyClass; }
/** Returns the class of values in this file. */ public synchronized Class<?> getValueClass() { if (null == valClass) { try { valClass = WritableName.getClass(getValueClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return valClass; }
/** Returns the class of keys in this file. */ public synchronized Class<?> getKeyClass() { if (null == keyClass) { try { keyClass = WritableName.getClass(getKeyClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return keyClass; }
/** Returns the class of values in this file. */ public synchronized Class<?> getValueClass() { if (null == valClass) { try { valClass = WritableName.getClass(getValueClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return valClass; }
/** Returns the class of values in this file. */ public synchronized Class<?> getValueClass() { if (null == valClass) { try { valClass = WritableName.getClass(getValueClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return valClass; }
/** Returns the class of values in this file. */ public synchronized Class<?> getValueClass() { if (null == valClass) { try { valClass = WritableName.getClass(getValueClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return valClass; }
/** Returns the class of values in this file. */ public synchronized Class<?> getValueClass() { if (null == valClass) { try { valClass = WritableName.getClass(getValueClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return valClass; }
/** Returns the class of keys in this file. */ public synchronized Class<?> getKeyClass() { if (null == keyClass) { try { keyClass = WritableName.getClass(getKeyClassName(), conf); } catch (IOException e) { throw new RuntimeException(e); } } return keyClass; }
public void testBadName() throws Exception { Configuration conf = new Configuration(); try { Class<?> test = WritableName.getClass("unknown_junk",conf); assertTrue(false); } catch(IOException e) { assertTrue(e.getMessage().matches(".*unknown_junk.*")); } }
public void testGoodName() throws Exception { Configuration conf = new Configuration(); Class<?> test = WritableName.getClass("long",conf); assertTrue(test != null); }
public void testGoodName() throws Exception { Configuration conf = new Configuration(); Class<?> test = WritableName.getClass("long",conf); assertTrue(test != null); }
public void testBadName() throws Exception { Configuration conf = new Configuration(); try { WritableName.getClass("unknown_junk",conf); assertTrue(false); } catch(IOException e) { assertTrue(e.getMessage().matches(".*unknown_junk.*")); } }
public void testAddName() throws Exception { Configuration conf = new Configuration(); String altName = testName + ".alt"; WritableName.setName(SimpleWritable.class, testName); WritableName.addName(SimpleWritable.class, altName); Class<?> test = WritableName.getClass(altName, conf); assertTrue(test.equals(SimpleWritable.class)); // check original name still works test = WritableName.getClass(testName, conf); assertTrue(test.equals(SimpleWritable.class)); }
public void testAddName() throws Exception { Configuration conf = new Configuration(); String altName = testName + ".alt"; WritableName.setName(SimpleWritable.class, testName); WritableName.addName(SimpleWritable.class, altName); Class<?> test = WritableName.getClass(altName, conf); assertTrue(test.equals(SimpleWritable.class)); // check original name still works test = WritableName.getClass(testName, conf); assertTrue(test.equals(SimpleWritable.class)); }
public void testSetName() throws Exception { Configuration conf = new Configuration(); WritableName.setName(SimpleWritable.class, testName); Class<?> test = WritableName.getClass(testName,conf); assertTrue(test.equals(SimpleWritable.class)); }