Subversion Repositories SmartDukaan

Rev

Rev 14467 | Rev 18286 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14467 Rev 14876
Line 49... Line 49...
49
M2_CLASSPATH="${MAVEN_REPO}/in/shop2020/ContentStore/1.0-SNAPSHOT/ContentStore-1.0-SNAPSHOT.jar:${MAVEN_REPO}/in/shop2020/ThriftConfig/1.0-SNAPSHOT/ThriftConfig-1.0-SNAPSHOT.jar:${MAVEN_REPO}/in/shop2020/Common/1.0-SNAPSHOT/Common-1.0-SNAPSHOT.jar:${MAVEN_REPO}/readonly/apache/velocity/1.6.3/velocity-1.6.3.jar:${MAVEN_REPO}/readonly/apache/commons-lang/2.4/commons-lang-2.4.jar:${MAVEN_REPO}/readonly/apache/commons-collections/3.2.1/commons-collections-3.2.1.jar:${MAVEN_REPO}/org/apache/thrift/libthrift/0.7.0/libthrift-0.7.0.jar:${MAVEN_REPO}/readonly/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.jar:${MAVEN_REPO}/readonly/slf4j/slf4j-simple/1.5.8/slf4j-simple-1.5.8.jar:${MAVEN_REPO}/readonly/apache/commons-logging-api/1.1/commons-logging-api-1.1.jar:${MAVEN_REPO}/readonly/bdb/je/4.1.7/je-4.1.7.jar:${MAVEN_REPO}/readonly/jython/2.5.1/jython-2.5.1.jar:${MAVEN_REPO}/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:${MAVEN_REPO}/readonly/apache/commons-io/1.3.2/commons-io-1.3.2.jar:${MAVEN_REPO}/org/json/json/20090211/json-20090211.jar:${MAVEN_REPO}/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar:${MAVEN_REPO}/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:${MAVEN_REPO}/javax/mail/mail/1.4/mail-1.4.jar:${MAVEN_REPO}/readonly/apache/poi-3.6/20091214/poi-3.6-20091214.jar:${MAVEN_REPO}/readonly/apache/poi-scratchpad-3.6/20091214/poi-scratchpad-3.6-20091214.jar:${MAVEN_REPO}/commons-net/commons-net/3.0.1/commons-net-3.0.1.jar:${MAVEN_REPO}/junit/junit/4.8.2/junit-4.8.2.jar:${MAVEN_REPO}/org/mongodb/mongo-java-driver/2.11.0/mongo-java-driver-2.11.0.jar"
49
M2_CLASSPATH="${MAVEN_REPO}/in/shop2020/ContentStore/1.0-SNAPSHOT/ContentStore-1.0-SNAPSHOT.jar:${MAVEN_REPO}/in/shop2020/ThriftConfig/1.0-SNAPSHOT/ThriftConfig-1.0-SNAPSHOT.jar:${MAVEN_REPO}/in/shop2020/Common/1.0-SNAPSHOT/Common-1.0-SNAPSHOT.jar:${MAVEN_REPO}/readonly/apache/velocity/1.6.3/velocity-1.6.3.jar:${MAVEN_REPO}/readonly/apache/commons-lang/2.4/commons-lang-2.4.jar:${MAVEN_REPO}/readonly/apache/commons-collections/3.2.1/commons-collections-3.2.1.jar:${MAVEN_REPO}/org/apache/thrift/libthrift/0.7.0/libthrift-0.7.0.jar:${MAVEN_REPO}/readonly/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.jar:${MAVEN_REPO}/readonly/slf4j/slf4j-simple/1.5.8/slf4j-simple-1.5.8.jar:${MAVEN_REPO}/readonly/apache/commons-logging-api/1.1/commons-logging-api-1.1.jar:${MAVEN_REPO}/readonly/bdb/je/4.1.7/je-4.1.7.jar:${MAVEN_REPO}/readonly/jython/2.5.1/jython-2.5.1.jar:${MAVEN_REPO}/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:${MAVEN_REPO}/readonly/apache/commons-io/1.3.2/commons-io-1.3.2.jar:${MAVEN_REPO}/org/json/json/20090211/json-20090211.jar:${MAVEN_REPO}/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar:${MAVEN_REPO}/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar:${MAVEN_REPO}/javax/mail/mail/1.4/mail-1.4.jar:${MAVEN_REPO}/readonly/apache/poi-3.6/20091214/poi-3.6-20091214.jar:${MAVEN_REPO}/readonly/apache/poi-scratchpad-3.6/20091214/poi-scratchpad-3.6-20091214.jar:${MAVEN_REPO}/commons-net/commons-net/3.0.1/commons-net-3.0.1.jar:${MAVEN_REPO}/junit/junit/4.8.2/junit-4.8.2.jar:${MAVEN_REPO}/org/mongodb/mongo-java-driver/2.11.0/mongo-java-driver-2.11.0.jar"
50
 
50
 
51
echo "Generating content for one entities ${PROJECT_DIR}"
51
echo "Generating content for one entities ${PROJECT_DIR}"
52
echo "======================================================="
52
echo "======================================================="
53
cd ${PROJECT_DIR}/ContentStore
53
cd ${PROJECT_DIR}/ContentStore
54
mysql -uroot -pshop2020 catalog -e "truncate tmpitemforcat;insert into tmpitemforcat SELECT * FROM item"
-
 
55
a1=$(mysql -uroot -N -pshop2020 catalog -e "SET SESSION group_concat_max_len = 100000;select GROUP_CONCAT(b.id) from ((select a.id from (select * from tmpitem union  distinct select * from tmpitemforcat) as a group by id having count(a.id) > 1) union (select id from tmpitemforcat i1 where not exists (select * from tmpitem t where t.id = i1.id))) as b")
-
 
56
java -Xms256m -Xmx512m -cp ${M2_CLASSPATH}  in.shop2020.util.ContentGenerationUtility -u CATALOG -t ALL > ${CONTENT_LOG} 
54
java -Xms256m -Xmx512m -cp ${M2_CLASSPATH}  in.shop2020.util.ContentGenerationUtility -u CATALOG -t ALL > ${CONTENT_LOG} 
57
echo "======================================================="
55
echo "======================================================="
58
echo "Content generation completed"
56
echo "Content generation completed"
59
 
57
 
60
echo "Dumping vendoritemmapping and vendoritempricing tables to be imported on staging and production servers"
58
echo "Dumping vendoritemmapping and vendoritempricing tables to be imported on staging and production servers"
61
echo "======================================================="
59
echo "======================================================="
62
cd ${PRGDIR}
60
cd ${PRGDIR}
63
mysqldump -uroot -pshop2020 catalog --tables similaritems source sourceitempricing category voucheritemmapping freebieitem entitytag amazonlisted storepricing brandinfo privatedeals iteminsurermapping > ${MYSQL_DUMP}
61
mysqldump -uroot -pshop2020 catalog --tables similaritems source sourceitempricing category voucheritemmapping freebieitem entitytag amazonlisted storepricing brandinfo privatedeals iteminsurermapping > ${MYSQL_DUMP}
-
 
62
mysql -uroot -pshop2020 catalog -e "truncate tmpitemforcat;insert into tmpitemforcat SELECT * FROM item"
-
 
63
a1=$(mysql -uroot -N -pshop2020 catalog -e "SET SESSION group_concat_max_len = 100000;select GROUP_CONCAT(b.id) from ((select a.id from (select * from tmpitem union  distinct select * from tmpitemforcat) as a group by id having count(a.id) > 1) union (select id from tmpitemforcat i1 where not exists (select * from tmpitem t where t.id = i1.id))) as b")
-
 
64
mysqldump -uroot -pshop2020 catalog item --replace --no-create-info --where="id in ($a1)" >> ${MYSQL_DUMP}
64
 
65
 
65
 
66
 
66
 
67
 
67
 
68
 
68
#get dump for siteContent
69
#get dump for siteContent