Skip to content

Instantly share code, notes, and snippets.

View viveknarang's full-sized avatar
🇨🇦
O Canada!

Vivek Narang viveknarang

🇨🇦
O Canada!
  • Toronto, Canada
View GitHub Profile
###########################################################
# Data Analytics Assignment A5: R Script for 6/14 A,B,C,D #
###########################################################
########## Script Written by Vivek Narang 4/4/17 ##########
###########################################################
# Importing relevant libraries #
library(reshape)
library(tidyr)
library(readr)
###############################################################
####################### Assignment A6 #########################
####################################### Vivek Narang ##########
# Start #
# Importing Required Libraries #
library(ggplot2)
library(ggmap)
library(mapproj)
library(DBI)
###################################################################
####################### DA: Assignment A7 #########################
########################################### Vivek Narang ##########
# Start #
# Importing required libraries #
library(readr)
library(stringr)
library(sentimentr)
[1]
SELECT count(DISTINCT salesDate), productID FROM basket_product GROUP BY productID order by count(DISTINCT salesDate) DESC
[1] MAIN (a)
SELECT product.productID, product.productDesc, SUM(basket_product.salesPrice*basket_product.salesQty), count(DISTINCT salesDate) FROM basket_product, product WHERE basket_product.productID = product.productID GROUP BY product.productID order by SUM(basket_product.salesPrice*basket_product.salesQty) desc, count(DISTINCT salesDate) DESC
[1] MAIN (b)
SELECT COUNT(DISTINCT salesDate) FROM basket_product
[2] (a)
################################################################
##################### Assignment A8-A ##########################
####################################### Vivek Narang ###########
# Start
# Importing libraries
library(dplyr)
# Reading the csv file
####################################################################
##################### Assignment A8 - B ############################
######################################### Vivek Narang #############
# Start
# Loading required libraries
library(rmr2)
library(tidyr)
library(readr)
SubProcess: OUTPUT >>
SubProcess: OUTPUT >> -clover.load:
SubProcess: OUTPUT >>
SubProcess: OUTPUT >> -clover.classpath:
SubProcess: OUTPUT >>
SubProcess: OUTPUT >> -clover.setup:
SubProcess: OUTPUT >>
SubProcess: OUTPUT >> clover:
SubProcess: OUTPUT >>
SubProcess: OUTPUT >> common.compile-core:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%aN",%n "date": "%ad",%n "message": "%f",%n "author email": "%ae",%n "timestamp": "%at",%n "committer name": "%cn",%n "committer email": "%ce",%n "commit date": "%cd"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'
[13:14] == SolrUser [6020d824@gateway/web/freenode/ip.96.32.216.36] has joined #solr
[13:14] == shellac [~textual@vpn-user-249-054.nomadic.bris.ac.uk] has joined #solr
[13:14] == clyon_ [~clyon@69-12-169-18.dedicated.static.sonic.net] has joined #solr
[13:15] <SolrUser> Hi, So I am trying to index documents using the ConcurrentUpdateSolrClient but even with different thread counts I do not notice any changes in indexing time ?
[13:16] <SolrUser> is there something i am not doing right ?
[13:20] <@hoss> SolrUser: it's posible that the code you have feeding docs to your SolrClient is itself the bottleneck
[13:20] <@hoss> in general, i'm not really a fan of ConcurrentUpdateSolrClient -- it doesn't do what most people expect, and it's error handling mechanincs are confusing
[13:20] <SolrUser> okay
[13:21] <@hoss> i haven't done extenisive testing to prove it, but i'm pretty sure that with a well configured HttpClient using aggressive keep-alive options, you can get HttpSolrClient to be just as efficient
[13:21] <
/* SolrNode node = new SolrNode(commitID, "", "", false);
node.doAction(SolrNodeAction.NODE_START);
node.createCollection("Core-" + UUID.randomUUID(), "Collection-" + UUID.randomUUID());
SolrIndexingClient client = new SolrIndexingClient("localhost", node.port, commitID);
String collectionName1 = "" + UUID.randomUUID();
node.createCollection("Core-" + UUID.randomUUID(), collectionName1);
BenchmarkReportData.metricMapStandaloneConcurrent1 = client.indexData(numDocuments, collectionName1, 1,
true, TestType.STANDALONE_INDEXING_THROUGHPUT_CONCURRENT_1, node.getBaseUrl());
node.deleteCollection(collectionName1);