sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abraham Elmahrek (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SQOOP-1658) Sqoop2: Add API documentation to private methods in repository
Date Mon, 03 Nov 2014 17:27:34 GMT
Abraham Elmahrek created SQOOP-1658:
---------------------------------------

             Summary: Sqoop2: Add API documentation to private methods in repository
                 Key: SQOOP-1658
                 URL: https://issues.apache.org/jira/browse/SQOOP-1658
             Project: Sqoop
          Issue Type: Bug
          Components: sqoop2-framework
    Affects Versions: 1.99.4
            Reporter: Abraham Elmahrek
             Fix For: 2.0.0


Examples:
{code}
  private void insertConnectorDirection(Long connectorId, Direction direction, Connection
conn)
      throws SQLException {
    PreparedStatement stmt = null;

    try {
      stmt = conn.prepareStatement(CommonRepositoryInsertUpdateDeleteSelectQuery.STMT_INSERT_SQ_CONNECTOR_DIRECTIONS);
      stmt.setLong(1, connectorId);
      stmt.setLong(2, getDirection(direction, conn));

      if (stmt.executeUpdate() != 1) {
        throw new SqoopException(CommonRepositoryError.COMMON_0043);
      }
    } finally {
      closeStatements(stmt);
    }
  }

  private void insertConnectorDirections(Long connectorId, SupportedDirections directions,
Connection conn)
      throws SQLException {
    if (directions.isDirectionSupported(Direction.FROM)) {
      insertConnectorDirection(connectorId, Direction.FROM, conn);
    }

    if (directions.isDirectionSupported(Direction.TO)) {
      insertConnectorDirection(connectorId, Direction.TO, conn);
    }
  }
{code}



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

Mime
View raw message