Bei der Ausführung einer CASLIB-Anweisung zur Verbindung mit Hadoop (oft über Hive) wird der Prozess angehalten und gibt die folgenden Fehlermeldungen im Protokoll (Log) zurück:
ERROR: The connection to the data source driver failed.
ERROR: General error java.util.concurrent.TimeoutException
ERROR: Function failed.
ERROR: The action stopped due to errors.
Dieses Problem tritt typischerweise bei der Verwendung einer expliziten Verbindungszeichenfolge auf, die die Option uri= enthält, wie im folgenden Beispiel:
/* Code provoquant l'erreur */
caslib hdlib datasource=(
srctype="hadoop",
dataTransferMode="serial",
username="{votre_user}",
password="{votre_mdp}",
/* L'option URI ci-dessous est souvent la cause du conflit */
uri="jdbc:hive2://{host}:2181...;serviceDiscoveryMode=zooKeeper;...",
hadoopjarpath="/sas_mirror/hadoopfiles/lib",
hadoopconfigdir="/sas_mirror/hadoopfiles/conf",
schema="default"
);
1
/* Code provoquant l'erreur */
2
caslib hdlib datasource=(
3
srctype="hadoop",
4
dataTransferMode="serial",
5
username="{votre_user}",
6
password="{votre_mdp}",
7
/* L'option URI ci-dessous est souvent la cause du conflit */
Zusätzlicher Tipp: Umgang mit einem langsamen Cluster
Wenn Sie nach Anwendung der obigen Korrektur immer noch Timeout-Fehler erhalten (insbesondere bei stark ausgelasteten Clustern), ist es möglich, dass die Standard-Zeitüberschreitung zu kurz ist.
Die Standard-Verbindungs-Timeout für Hadoop beträgt normalerweise 30 Sekunden. Sie können diesen Wert erhöhen, indem Sie die Option login_timeout hinzufügen:
caslib hdlib datasource=(
...
login_timeout=60 /* Augmentation du délai à 60 secondes */
...
);
1
caslib hdlib datasource=(
2
...
3
login_timeout=60/* Augmentation du délai à 60 secondes */
4
...
5
);
Important Disclaimer
The codes and examples provided on WeAreCAS.eu are for educational purposes. It is imperative not to blindly copy-paste them into your production environments. The best approach is to understand the logic before applying it. We strongly recommend testing these scripts in a test environment (Sandbox/Dev). WeAreCAS accepts no responsibility for any impact or data loss on your systems.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.