>source

SQL Server 명명 된 인스턴스에 연결하기위한 적절한 Sqoop 코드는 무엇입니까? 기본 인스턴스에 연결하는 코드를 알고 있었지만 명명 된 인스턴스에 대해서는 아무것도 찾을 수 없습니다. 아래 코드가 작동하지 않습니다.

sqoop list-databases --connect 'jdbc:sqlserver://abc:1433\sql1;username=abc;password=abc'

오류 메시지는 다음과 같습니다.

Warning: /usr/hdp/3.1.0.0-78/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/phoenix/phoenix-5.0.0.3.1.0.0-78-server.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
19/05/17 14:03:45 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7.3.1.0.0-78
19/05/17 14:03:45 INFO manager.SqlManager: Using default fetchSize of 1000
19/05/17 14:03:45 ERROR manager.CatalogQueryManager: Failed to list databases
com.microsoft.sqlserver.jdbc.SQLServerException: The port number 1433\sql1 is not valid.
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:227)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1340)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:866)
        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:569)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:270)
        at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:902)
        at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:59)
        at org.apache.sqoop.manager.CatalogQueryManager.listDatabases(CatalogQueryManager.java:57)
        at org.apache.sqoop.tool.ListDatabasesTool.run(ListDatabasesTool.java:49)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:150)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:186)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:240)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:249)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:258)
19/05/17 14:03:45 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: The port number 1433\sql1 is not valid.
java.lang.RuntimeException: com.microsoft.sqlserver.jdbc.SQLServerException: The port number 1433\sql1 is not valid.


  • 답변 # 1

    이것을 시도하십시오

    sqoop list-tables -Dmapreduce.job.queuename=<yourqueue> — connect "jdbc:sqlserver://<sqlserverhost>\\instancename:<sqlserver port>;database=<sqlserver database>;username=<sqlserver user>;password=<sqlserver password>" 
    
    

관련 자료

  • 이전 java - Spark Streaming 응용 프로그램을 스파크 제출하는 방법
  • 다음 로컬 호스트에서 하나의 사용 가능한 플레이 북 작업을 실행 한 다음 원격 서버에서 다른 작업을 실행하십시오