You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "Alex Levenson (JIRA)" <ji...@apache.org> on 2015/07/28 21:52:04 UTC

[jira] [Created] (PARQUET-345) ThriftMetaData toString() should not try to load class reflectively

Alex Levenson created PARQUET-345:
-------------------------------------

             Summary: ThriftMetaData toString() should not try to load class reflectively
                 Key: PARQUET-345
                 URL: https://issues.apache.org/jira/browse/PARQUET-345
             Project: Parquet
          Issue Type: Bug
          Components: parquet-mr
            Reporter: Alex Levenson
            Priority: Minor


Currently:
{noformat}
  @Override
  public String toString() {
    return "ThriftMetaData" + toExtraMetaData();
  }

/**
   * generates a map of key values to store in the footer
   * @return the key values
   */
  public Map<String, String> toExtraMetaData() {
    final Map<String, String> map = new HashMap<String, String>();
    map.put(THRIFT_CLASS, getThriftClass().getName());
    map.put(THRIFT_DESCRIPTOR, descriptor.toJSON());
    return map;
  }
{noformat}

There's no guarantee that getThriftClass() won't throw (a class in the file footer doesn't actually need to be on the classpath if its never used) -- this masks real error when the error message is being generated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)