ParquetMigrate.sh 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/sh
  2. # Licensed Materials - Property of IBM
  3. # IBM Cognos Products: Moser
  4. # (C) Copyright IBM Corp. 2020
  5. # US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  6. # This shell script assumes it is being executed from bin or bin64 directory.
  7. # migrates uploaded files from older version to the new one
  8. # ParquetMigrate - A tool to migrate uploaded files from older version to the new one
  9. # Usage:
  10. # Options:
  11. # -h : url pointing to the cognos server [optional]
  12. # -n : Authentication namespace, -u and -p required if specified [optional]
  13. # -u : Namespace user, -n and -p required if specified [optional]
  14. # -p : Namespace password, -n and -u required if specified [optional]
  15. # -d : display the information about the parquet files that needed an upgrade [optional]
  16. # -k : ignore the SSL certificate validation [optional]
  17. # -l : apply to only to the number of last used files [optional]
  18. # -t : filter displayed results by task id (only works with -d) [optional]
  19. # -s : store id (will apply the command down to the hierarchy starting with the provided store ID)[optional]
  20. # -m : smarts upgrade after the parquet conversion [optional]
  21. # -a : smarts version upgrade only [optional]
  22. #
  23. # Examples:
  24. # Display parquet files/datasets info:
  25. # ParquetMigrate -d -n namespace -u username -p password
  26. # or
  27. # ParquetMigrate -d -h http://localhost:9300 -n namespace -u username -p password
  28. #
  29. # Upgrade parquet files/datasets:
  30. # ParquetMigrate -n namespace -u username -p password
  31. #
  32. # Upgrade parquet files/datasets and apply deep smart analysis:
  33. # ParquetMigrate -m -n namespace -u username -p password
  34. SEP=":"
  35. JAVA="../ibm-jre/jre/bin/java"
  36. CRN_LIB_HOME="../webapps/p2pd/WEB-INF/lib"
  37. if [ `uname` = "Windows_NT" ]
  38. then
  39. SEP=";"
  40. echo `uname`
  41. fi
  42. CLASSPATH="."
  43. CLASSPATH="$CLASSPATH$SEP$CRN_LIB_HOME/*"
  44. CLASSPATH="$CLASSPATH$SEP../flint/libs/*"
  45. CLASSPATH="$CLASSPATH$SEP../bin/slf4j-api-1.7.23.jar$SEP../bin/slf4j-nop-1.7.23.jar"
  46. JAVA="$JAVA -Dcom.ibm.jsse2.overrideDefaultTLS=true"
  47. $JAVA -classpath "$CLASSPATH" com.ibm.bi.platform.moser.common.utils.ParquetUpgrade "$@"