Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Calculate private project ratings #39

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
.vscode
bin
build
10 changes: 10 additions & 0 deletions build_tcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@
<pathelement location="${jars.dir}/tcs/ldap_sdk_interface/1.0.2/ldap_sdk_interface.jar"/>
<pathelement location="${jars.dir}/netscape_ldap_sdk.jar"/>
<pathelement location="${jars.dir}/ldap.jar"/>

<!-- jackson and request dependencies -->
<pathelement location="${jars.dir}/jackson-core-2.6.1.jar"/>
<pathelement location="${jars.dir}/jackson-databind-2.6.1.jar"/>
<pathelement location="${jars.dir}/jackson-annotations-2.6.1.jar"/>
<pathelement location="${jars.dir}/fluent-hc-4.5.1.jar"/>
<pathelement location="${jars.dir}/httpclient-4.5.1.jar"/>
<pathelement location="${jars.dir}/httpcore-4.4.3.jar"/>
<pathelement location="${jars.dir}/commons-logging-1.2.jar"/>

</path>

<target name="init">
Expand Down
13 changes: 11 additions & 2 deletions conf/com/topcoder/dde/util/DWLoad/RatingQubits.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
<Value>com.informix.jdbc.IfxDriver</Value>
</Property>
<Property name="ConnectionURL">
<Value>jdbc:informix-sqli://63.118.154.190:1526/tcs_catalog:INFORMIXSERVER=devinformix10_shm;user=coder;password=altec</Value>
<Value><![CDATA[jdbc:informix-sqli://127.0.0.1:7000/tcs_catalog:INFORMIXSERVER=commtestoltp_tcp;user=user;password=password]]></Value>
</Property>
<Property name="HistoryLength">
<Value>50</Value>
<Value>300</Value>
</Property>
<Property name="PhaseIds">
<Value>150</Value>
<Value>149</Value>
</Property>
<Property name="CutOffs">
<Value>06/01/2010 06:06:06</Value>
<Value>NULL</Value>
</Property>

</CMConfig>
Binary file added lib/jars/commons-logging-1.2.jar
Binary file not shown.
Binary file added lib/jars/fluent-hc-4.5.1.jar
Binary file not shown.
Binary file added lib/jars/httpclient-4.5.1.jar
Binary file not shown.
Binary file added lib/jars/httpcore-4.4.3.jar
Binary file not shown.
Binary file added lib/jars/jackson-annotations-2.6.1.jar
Binary file not shown.
Binary file added lib/jars/jackson-core-2.6.1.jar
Binary file not shown.
Binary file added lib/jars/jackson-databind-2.6.1.jar
Binary file not shown.
24 changes: 24 additions & 0 deletions scripts/dde/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ratings calculation tool

## Configuration
configuration is stored in `conf/com/topcoder/dde/RatingQubits.xml` and the following values should be updated:

- `ConnectionURL` - should be updated to point to oltp database
-



## Compilation

Make sure your JAVA_HOME points to JDK 1.7 home directory and ANT_HOME points to ant 1.9.15 home directory. Then run the following

`java -Dhttps.protocols=TLSv1.2 -cp %ANT_HOME%/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher compile -f build_tcs.xml`

running ant manually is needed to allow it to download dependencies using https/ssl from maven repository and github

## Running

Update database configuration, move to `scripts/dde/` directory and run `runRatings.sh` script

NOTE: if running on Windows, edit the $SEPARATOR variable in runRatings.sh and set it to `;` instead of `:`

36 changes: 24 additions & 12 deletions scripts/dde/runRatings.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
BASE=../..
SEPARATOR=":"
CP=""
CP=$CP:$BASE/conf
CP=$CP:$BASE/resources
CP=$CP:$BASE/lib/jars/log4j.jar
CP=$CP:$BASE/lib/jars/ifxjdbc.jar
CP=$CP:$BASE/lib/jars/jdbc7.0-1.2.jar
CP=$CP:$BASE/lib/jars/xml/xerces/xercesImpl.jar
CP=$CP:$BASE/build/classes
CP=$CP:$BASE/lib/jars/tcsUtil.jar
CP=$CP:$BASE/lib/jars/configmanager2.jar
CP=$CP:$BASE/lib/jars/jboss/xercesImpl.jar
CP=$CP:$BASE/lib/jars/jboss/xml-apis.jar
CP=$CP$SEPARATOR$BASE/conf
CP=$CP$SEPARATOR$BASE/resources
CP=$CP$SEPARATOR$BASE/lib/jars/log4j.jar
CP=$CP$SEPARATOR$BASE/lib/jars/ifxjdbc.jar
CP=$CP$SEPARATOR$BASE/lib/jars/jdbc7.0-1.2.jar
CP=$CP$SEPARATOR$BASE/lib/jars/xml/xerces/xercesImpl.jar
CP=$CP$SEPARATOR$BASE/build/classes
CP=$CP$SEPARATOR$BASE/lib/jars/tcsUtil.jar
CP=$CP$SEPARATOR$BASE/lib/jars/configmanager2.jar
CP=$CP$SEPARATOR$BASE/lib/jars/jboss/xercesImpl.jar
CP=$CP$SEPARATOR$BASE/lib/jars/jboss/xml-apis.jar
CP=$CP$SEPARATOR$BASE/lib/jars/log4j-1.2.7.jar
CP=$CP$SEPARATOR$BASE/lib/bin/shared.jar
CP=$CP$SEPARATOR$BASE/lib/jars/jackson-core-2.6.1.jar
CP=$CP$SEPARATOR$BASE/lib/jars/jackson-databind-2.6.1.jar
CP=$CP$SEPARATOR$BASE/lib/jars/jackson-annotations-2.6.1.jar
CP=$CP$SEPARATOR$BASE/lib/jars/fluent-hc-4.5.1.jar
CP=$CP$SEPARATOR$BASE/lib/jars/httpclient-4.5.1.jar
CP=$CP$SEPARATOR$BASE/lib/jars/httpcore-4.4.3.jar
CP=$CP$SEPARATOR$BASE/lib/jars/commons-logging-1.2.jar
CP=$CP$SEPARATOR$BASE/lib/jars/ifxjdbc.jar

nohup java -cp $CP com.topcoder.dde.util.DWLoad.RatingQubits >> ./ratings.log 2>&1 &
echo $CP
java -Dhttps.protocols=TLSv1.2 -cp $CP com.topcoder.dde.util.DWLoad.RatingQubits
Loading