Sorting using Hadoop - TotalOrderPartitioner

Please Visit: http://lifelongprogrammer.blogspot.com



Sorting using Hadoop – TotalOrderPartitioner

http://pipiper.wordpress.com/2013/05/02/sorting-using-hadoop-totalorderpartitioner/

job.setPartitionerClass(TotalOrderPartitioner.class);

job.setSortComparatorClass(SortKeyComparator.class);

job.setPartitionerClass(TotalOrderPartitioner.class);



Path inputDir = new Path(partitionLocation);

Path partitionFile = new Path(inputDir, "partitioning");

TotalOrderPartitioner.setPartitionFile(job.getConfiguration(), partitionFile);



int numSamples = numReduceTasks;

int maxSplits = numReduceTasks - 1;



InputSampler.Sampler sampler = new InputSampler.RandomSampler(pcnt, numSamples, maxSplits);

InputSampler.writePartitionFile(job, sampler);



from Google Plus RSS Feed for 101157854606139706613 http://pipiper.wordpress.com/2013/05/02/sorting-using-hadoop-totalorderpartitioner

via LifeLong Community

[LUCENE-4956] the korean analyzer that has a korean morphological analyzer and dictionaries - ASF JIRA

Please Visit: http://lifelongprogrammer.blogspot.com



Solr Korean Tokenizer

https://issues.apache.org/jira/browse/LUCENE-4956



from Google Plus RSS Feed for 101157854606139706613 https://issues.apache.org/jira/browse/LUCENE-4956

via LifeLong Community

Quotes, Escape Characters, Delimiters | SS64.com

Please Visit: http://lifelongprogrammer.blogspot.com



Windows Batch Syntax : Escape Characters, Delimiters and Quotes

http://ss64.com/nt/syntax-esc.html



from Google Plus RSS Feed for 101157854606139706613 http://ss64.com/nt/syntax-esc.html

via LifeLong Community

kuromoji - japanese morphological analyzer

Please Visit: http://lifelongprogrammer.blogspot.com



Japanese Tokenizer: Multi-Language Analysis in Solr

http://www.atilika.org/

http://mentaldetritus.blogspot.com/2013/03/custom-japanese-tokenization-in-solr-40.html

Solr 4.0 (really, it's been there since 3.6) has a new analysis module for handling Japanese, called Kuromoji.



java -cp kuromoji-0.7.7.jar org.atilika.kuromoji.TokenizerRunner

<fieldType name="text_ja" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="false">



from Google Plus RSS Feed for 101157854606139706613 http://www.atilika.org

via LifeLong Community

SSH Keys - ArchWiki

Please Visit: http://lifelongprogrammer.blogspot.com



SSH and SSH Agent

https://wiki.archlinux.org/index.php/SSH_Keys#SSH_agents



from Google Plus RSS Feed for 101157854606139706613 https://wiki.archlinux.org/index.php/SSH_Keys#SSH_agents

via LifeLong Community

Secure Shell: How Does SSH Work http://www.slashroot.in/secure-shell-h

Please Visit: http://lifelongprogrammer.blogspot.com



Secure Shell: How Does SSH Work

http://www.slashroot.in/secure-shell-how-does-ssh-work



from Google Plus RSS Feed for 101157854606139706613 https://plus.google.com/101157854606139706613/posts/WHkYFZfufXv

via LifeLong Community

Hadoop I/O: Sequence, Map, Set, Array, BloomMap Files

Please Visit: http://lifelongprogrammer.blogspot.com



Hadoop I/O: Sequence, Map, Set, Array, BloomMap Files

http://blog.cloudera.com/blog/2011/01/hadoop-io-sequence-map-set-array-bloommap-files/



from Google Plus RSS Feed for 101157854606139706613 http://blog.cloudera.com/blog/2011/01/hadoop-io-sequence-map-set-array-bloommap-files

via LifeLong Community

SolrCloud and Shard Splitting

Please Visit: http://lifelongprogrammer.blogspot.com



Shard Splitting and Document Routing in SolrCloud

http://www.slideshare.net/shalinmangar/solr-cloud-shardsplitting

http://www.slideshare.net/thelabdude/tjp-solr-webinar#

Document Routing: Custom Hashing

http://searchhub.org/2013/06/13/solr-cloud-document-routing/ numShards=4 router=compositeId

id = BigCo!doc5

q=my_query&shard.keys=BigCo!

Co-locate documents



SolrCloud Collections API

/admin/collections?action=CREATE|DELETE|RELOAD|CREATE&name=mycollection



Each shard is assigned a hash range

Each shard also has a state which defaults to 'ACTIVE'

Seamless on-the-fly splitting – no downtime required

● Retried on failures

● /admin/collections?

action=SPLITSHARD&collection=mycollection

– &shard=shardId

● A lower-level CoreAdmin API comes free!

– /admin/cores?action=SPLIT&core=core0&targetCore=core1&targetCore=core2

– /admin/cores?action=SPLIT&core=core0&path=/path/to/index/1&path=/path/to/index/2





https://issues.apache.org/jira/browse/SOLR-4816

1) Document routing: Updates are routed directly to the correct shard leader eliminating document routing at the server.

2) Optional parallel update execution: Updates for each shard are executed in a separate thread so parallel indexing can occur across the cluster.



https://issues.apache.org/jira/browse/SOLR-3076

Solr(Cloud) should support block joins





https://issues.apache.org/jira/browse/SOLR-5025

Implement true re-sharding for SolrCloud ==Unresolved



from Google Plus RSS Feed for 101157854606139706613 http://www.slideshare.net/shalinmangar/solr-cloud-shardsplitting

via LifeLong Community

I really need to know the reason.

Please Visit: http://lifelongprogrammer.blogspot.com





I really need to know the reason.

Jeffery yuan (https://plus.google.com/101157854606139706613/posts/MyAi5vPCCwP) via Funny All Time (https://plus.google.com/100710407841429898853/posts/RhySzmzyApU)



from Google Plus RSS Feed for 101157854606139706613 https://lh4.googleusercontent.com/-Xib8EOMrNGE/Us6F5pRHnrI/AAAAAAAAEd8/wyKUh8JfHPg/w250-h187/2a33e9fea064fcd8694b4ef.gif

via LifeLong Community

To import Solr Project to Eclipse, just run ant eclipse.

Please Visit: http://lifelongprogrammer.blogspot.com



To import Solr Project to Eclipse, just run ant eclipse.



from Google Plus RSS Feed for 101157854606139706613 https://plus.google.com/101157854606139706613/posts/cUYagCq4QVu

via LifeLong Community

CJK with Solr for Libraries, part 1 - part 5

Script Translations
Han Traditional <--> Simplified
<filter class="solr.ICUTransformFilterFactory" id="Traditional-Simplified"/>
Katakana <--> Hiragana
<filter class="solr.ICUTransformFilterFactory" id="Katakana-Hiragana"/> 
http://discovery-grindstone.blogspot.com/2013/10/cjk-with-solr-for-libraries-part-1.html
http://discovery-grindstone.blogspot.com/2013/11/cjk-with-solr-for-libraries-part-2.html
http://discovery-grindstone.blogspot.com/2013/11/cjk-with-solr-for-libraries-part-3.html
http://discovery-grindstone.blogspot.com/2014/01/cjk-with-solr-for-libraries-part-4.html
http://discovery-grindstone.blogspot.com/2014/01/cjk-with-solr-for-libraries-part-5.html
http://discovery-grindstone.blogspot.com/2014/01/cjk-with-solr-for-libraries-part-6.html

http://www.hathitrust.org/blogs/large-scale-search/multilingual-issues-part-1-word-segmentation

Reading the output of a command into a batch file variable

http://blogs.msdn.com/b/oldnewthing/archive/2012/07/31/10334556.aspx

for /F "delims=" %%i in ('dir /B /S "%JAVA_HOME%" /a-d ^| findstr jvm.dll') do set "NEW_PR_JVM=%%i"

The /F flag to the FOR command says that it should open the file you pass in parentheses and set the loop variable to the contents of each line.
for /f %%i in (words.txt) do echo [%%i]
The loop variable in the FOR command takes one percent sign if you are executing it directly from the command prompt, but two percent signs if you are executing it from a batch file. 
By default, the FOR command sets the loop variable to the first word of each line. If you want to capture the entire line, you need to change the delimiter.

for /f "delims=" %%i in (names.txt) do echo [%%i]

You can put the file name in single quotes to say "Instead of opening this file and reading the contents, I want you to run this command and read the contents."
for /f "delims=" %%i in ('printappdir') do cd "%%i"

for /f %%i in ('printappdir') do set RESULT=%%i
echo The directory is %RESULT%

for /f "tokens=1-2,14" %%i in ('ipconfig') do ^
    if "%%i %%j"=="IPv4 Address." set IPADDR=%%k
The above command asked to execute the ipconfig command and extract the first, second, and fourteenth words into loop variable starting with %i. In other words, %i gets the first word, %j gets the second word, and %k gets the fourteenth word.

for /f "tokens=14" %%i in ('ipconfig ^| findstr /C:"IPv4 Address"') do ^
  set IPADDR=%%i

In PowerShell
foreach ($i in Get-WmiObject Win32_NetworkAdapterConfiguration) {
  if ($i.IPaddress) { $i.IPaddress[0] }
}

Sleep for x Seconds in Windows Batch or PowerShell

Timeout
http://technet.microsoft.com/en-us/library/cc754891.aspx
timeout /t <TimeoutInSeconds> [/nobreak] 
timeout /t 10
timeout /t 100 /nobreak
To pause the command processor indefinitely until a key is pressed, type:
timeout /t -1

for older windows, using
ping 127.0.0.1 -n 5 -w 1000 > nul

In PowerShell
Start-Sleep -s 5
powershell -command "Start-Sleep -s 5"
Start-Sleep -m 10000

CS188Spring2013: - Introduction to Artificial Intelligence http://www.

Please Visit: http://lifelongprogrammer.blogspot.com



CS188Spring2013: - Introduction to Artificial Intelligence

http://www.youtube.com/user/CS188Spring2013



from Google Plus RSS Feed for 101157854606139706613 https://plus.google.com/101157854606139706613/posts/iJun5wSgN3D

via LifeLong Community

The Specified Service Has Been Marked For Deletion - DevOps On Windows

Please Visit: http://lifelongprogrammer.blogspot.com



How to fix "The specified service has been marked for deletion"

Typically this error message happens because something else has locked the installed service database: Common culprits: mmc.exe, services.msc, Process Explorer (Sysinternals)

http://www.devopsonwindows.com/the-specified-service-has-been-marked-for-deletion/

http://growlycode.blogspot.com/2011/05/how-to-fix-specified-service-has-been.html

http://blog.cyotec.com/2011/05/specified-service-has-been-marked-for.html



from Google Plus RSS Feed for 101157854606139706613 http://www.devopsonwindows.com/the-specified-service-has-been-marked-for-deletion

via LifeLong Community

Using Apache Procrun to Rename Process Name of a Java Program in Windows

Please Visit: http://lifelongprogrammer.blogspot.com



Using Apache Procrun to Rename Process Name of a Java Program in Windows

Using Apache Procrun to Rename Process Name of a Java Program in Windows

http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

Describe the approach to rename process name of a java application by using Apache Procrun to wrap it as a service, and rename prunsrv.exe to an meaningful name such as MyApp.exe.



set PRUNSRV=%~dp0%MyApp.exe

"%PRUNSRV%" //IS//%SERVICE_JAVA% --Install="%PRUNSRV%"

Jeffery yuan (https://plus.google.com/101157854606139706613/posts/LKPUN7Pzd1X) via Jeffery yuan (https://plus.google.com/101157854606139706613/posts/3oxDhZydVNQ)



from Google Plus RSS Feed for 101157854606139706613 http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

via LifeLong Community

Using Apache Procrun to Rename Process Name of a Java Program in Windows

Please Visit: http://lifelongprogrammer.blogspot.com



Using Apache Procrun to Rename Process Name of a Java Program in Windows

Using Apache Procrun to Rename Process Name of a Java Program in Windows

http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

Describe the approach to rename process name of a java application by using Apache Procrun to wrap it as a service, and rename prunsrv.exe to an meaningful name such as MyApp.exe.



set PRUNSRV=%~dp0%MyApp.exe

"%PRUNSRV%" //IS//%SERVICE_JAVA% --Install="%PRUNSRV%"

Jeffery yuan (https://plus.google.com/101157854606139706613/posts/25ZUFLgc8ve) via Jeffery yuan (https://plus.google.com/101157854606139706613/posts/3oxDhZydVNQ)



from Google Plus RSS Feed for 101157854606139706613 http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

via LifeLong Community

Using Apache Procrun to Rename Process Name of a Java Program in Windows

Please Visit: http://lifelongprogrammer.blogspot.com



Using Apache Procrun to Rename Process Name of a Java Program in Windows

Using Apache Procrun to Rename Process Name of a Java Program in Windows

http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

Describe the approach to rename process name of a java application by using Apache Procrun to wrap it as a service, and rename prunsrv.exe to an meaningful name such as MyApp.exe.



set PRUNSRV=%~dp0%MyApp.exe

"%PRUNSRV%" //IS//%SERVICE_JAVA% --Install="%PRUNSRV%"

Jeffery yuan (https://plus.google.com/101157854606139706613/posts/3mT6yT17CSX) via Jeffery yuan (https://plus.google.com/101157854606139706613/posts/3oxDhZydVNQ)



from Google Plus RSS Feed for 101157854606139706613 http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

via LifeLong Community

Using Apache Procrun to Rename Process Name of a Java Program in Windows

Please Visit: http://lifelongprogrammer.blogspot.com



Using Apache Procrun to Rename Process Name of a Java Program in Windows

Using Apache Procrun to Rename Process Name of a Java Program in Windows

http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

Describe the approach to rename process name of a java application by using Apache Procrun to wrap it as a service, and rename prunsrv.exe to an meaningful name such as MyApp.exe.



set PRUNSRV=%~dp0%MyApp.exe

"%PRUNSRV%" //IS//%SERVICE_JAVA% --Install="%PRUNSRV%"

Jeffery yuan (https://plus.google.com/101157854606139706613/posts/PR57zk5VWTJ) via Jeffery yuan (https://plus.google.com/101157854606139706613/posts/3oxDhZydVNQ)



from Google Plus RSS Feed for 101157854606139706613 http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

via LifeLong Community

Using Apache Procrun to Rename Process Name of a Java Program in Windows

Please Visit: http://lifelongprogrammer.blogspot.com



Using Apache Procrun to Rename Process Name of a Java Program in Windows

Using Apache Procrun to Rename Process Name of a Java Program in Windows

http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

Describe the approach to rename process name of a java application by using Apache Procrun to wrap it as a service, and rename prunsrv.exe to an meaningful name such as MyApp.exe.



set PRUNSRV=%~dp0%MyApp.exe

"%PRUNSRV%" //IS//%SERVICE_JAVA% --Install="%PRUNSRV%"

Jeffery yuan (https://plus.google.com/101157854606139706613/posts/8ZTJYSPWJeG) via Jeffery yuan (https://plus.google.com/101157854606139706613/posts/3oxDhZydVNQ)



from Google Plus RSS Feed for 101157854606139706613 http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

via LifeLong Community

Using Apache Procrun to Rename Process Name of a Java Program in Windows

Please Visit: http://lifelongprogrammer.blogspot.com



Using Apache Procrun to Rename Process Name of a Java Program in Windows

Using Apache Procrun to Rename Process Name of a Java Program in Windows

http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

Describe the approach to rename process name of a java application by using Apache Procrun to wrap it as a service, and rename prunsrv.exe to an meaningful name such as MyApp.exe.



set PRUNSRV=%~dp0%MyApp.exe

"%PRUNSRV%" //IS//%SERVICE_JAVA% --Install="%PRUNSRV%"

Jeffery yuan (https://plus.google.com/101157854606139706613/posts/caGvJgJ4cJc) via Jeffery yuan (https://plus.google.com/101157854606139706613/posts/3oxDhZydVNQ)



from Google Plus RSS Feed for 101157854606139706613 http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

via LifeLong Community

Using Apache Procrun to Rename Process Name of a Java Program in Windows

Please Visit: http://lifelongprogrammer.blogspot.com



Using Apache Procrun to Rename Process Name of a Java Program in Windows

http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

Describe the approach to rename process name of a java application by using Apache Procrun to wrap it as a service, and rename prunsrv.exe to an meaningful name such as MyApp.exe.



set PRUNSRV=%~dp0%MyApp.exe

"%PRUNSRV%" //IS//%SERVICE_JAVA% --Install="%PRUNSRV%"



from Google Plus RSS Feed for 101157854606139706613 http://lifelongprogrammer.blogspot.com/2014/01/using-apache-procrun-to-rename-java-process-name.html

via LifeLong Community

Poor man's "entity" extraction with Solr

Please Visit: http://lifelongprogrammer.blogspot.com



Poor man’s “entity” extraction with Solr

http://searchhub.org/2013/06/27/poor-mans-entity-extraction-with-solr/?utm_source=rss&utm_medium=rss&utm_campaign=poor-mans-entity-extraction-with-solr



from Google Plus RSS Feed for 101157854606139706613 http://searchhub.org/2013/06/27/poor-mans-entity-extraction-with-solr/?utm_source=rss&utm_medium=rss&utm_campaign=poor-mans-entity-extraction-with-solr

via LifeLong Community

Managing Services the PowerShell way – Part 3: Start and stop Services

Please Visit: http://lifelongprogrammer.blogspot.com



Managing Services the PowerShell way – Part 3: Start and stop Services

http://4sysops.com/archives/managing-services-the-powershell-way-part-3/ get-service bits

stop-service bits -PassThru

get-service bits | where {$_.status -eq 'running'} | stop-service -pass

start-service wuauserv -PassThru

restart-service spooler -PassThru



get-service bits | select *

suspend-service o2flash -PassThru

resume-service o2flash -PassThru



Remote Services

Invoke-Command {restart-service dns –passthru} –comp chi-dc03,chi-dc02,chi-dc01



from Google Plus RSS Feed for 101157854606139706613 http://4sysops.com/archives/managing-services-the-powershell-way-part-3

via LifeLong Community

Several ways to call a windows batch file from another one or from prompt. Which one in which case?

Please Visit: http://lifelongprogrammer.blogspot.com



Several ways to call a windows batch file from another one

http://stackoverflow.com/questions/2607856/several-ways-to-call-a-windows-batch-file-from-another-one-or-from-prompt-which

direct call: called.bat

the batch file will be executed by the current cmd.exe instance (or a new cmd.exe instance if, for instance, double-clicked in Explorer).



using call command: call called.bat

same as #1, only has an effect when used inside a batch/cmd file. In a batch file, without 'call', the parent batch file ends and control passes to the called batch file; with 'call' runs the child batch file, after the child batch finishes, the parent batch file continues with statements following call.



using cmd command: cmd /c called.bat

runs the batch file in a new cmd.exe instance.



using start command: start called.bat

start will run the batch file in a new cmd.exe instance in a new window, and the caller will not wait for completion.



from Google Plus RSS Feed for 101157854606139706613 http://stackoverflow.com/questions/2607856/several-ways-to-call-a-windows-batch-file-from-another-one-or-from-prompt-which

via LifeLong Community

Windows PowerShell Commands: Remove-Item Delete al file that is both h

Please Visit: http://lifelongprogrammer.blogspot.com



Windows PowerShell Commands: Remove-Item

Delete al file that is both hidden and read-only:

Remove-Item -Recurse -Force .\incubator-blur

Remove-Item c:\scripts\* -exclude *.wav

Remove-Item c:\scripts\* -include .txt -exclude *test

Delete only a folder called ss64:

PS C:\> remove-item ss64 | Where { $_.PSIsContainer }

Delete only a file called ss64:

PS C:\> remove-item ss64 | Where { ! $_.PSIsContainer }



from Google Plus RSS Feed for 101157854606139706613 https://plus.google.com/101157854606139706613/posts/dJ3NJMe83ds

via LifeLong Community

Apache Blur (Incubating) Home

Windows' equivalent of the "which“ command in Unix: where and Get-Command

http://superuser.com/questions/207707/what-is-windows-equivalent-of-the-which-command-in-unix-is-there-an-equivale Get-Command will find all commands including executables:
PS\> Get-Command ipconfig
If you want to limit the commands to just executables:
PS\> Get-Command -CommandType Application

WHERE (Windows 2003 + )
http://ss64.com/nt/where.html
Locate and display files in a directory tree. 
The WHERE command is roughly equivalent to the UNIX 'which' command. By default, the search is done in the current directory and in the PATH.

WHERE /r c:\ Zappa
WHERE /r \\Server1\Share1 /e Zappa.*

Select-String

Please Visit: http://lifelongprogrammer.blogspot.com



Learning PwoerShell COmmands: Select-String and Measure-Object

Select-String

http://technet.microsoft.com/en-us/library/hh849903.aspx select-string -path $pshome\en-US\*.txt -pattern "@"

$f = select-string -path audit.log -pattern "logon failed" -context 2, 3

$f.count

(select-string -path audit.log -pattern "logon failed").count

Select-String C:\Scripts\Test.lxt -pattern "failure" -context 2

Select-String C:\Scripts\Test.lxt -pattern "failure" -context 3,1



Measure-Object

http://technet.microsoft.com/en-us/library/hh849965.aspx

Display the number of characters, words, and lines in the Text.txt file.

get-content C:\test.txt | measure-object -character -line -word

get-childitem | measure-object -property length -minimum -maximum -average

import-csv d:\test\serviceyrs.csv | measure-object -property years -minimum -maximum -average



from Google Plus RSS Feed for 101157854606139706613 http://technet.microsoft.com/en-us/library/hh849903.aspx

via LifeLong Community

Base 2 arithmetic and boolean tricks

Please Visit: http://lifelongprogrammer.blogspot.com



Base 2 arithmetic and boolean tricks

http://www.ugcs.caltech.edu/~wnoise/base2.html

x & (x-1)

= x with the lowest set bit cleared.

x & ~(x-1)

= extracts the lowest set bit of x (all others are clear)

x | (x+1)

= x with the lowest cleared bit set.

x | ~(x+1)

= extracts the lowest cleared bit of x (all others are set).



from Google Plus RSS Feed for 101157854606139706613 http://www.ugcs.caltech.edu/~wnoise/base2.html

via LifeLong Community

Power set - Wikipedia, the free encyclopedia

Please Visit: http://lifelongprogrammer.blogspot.com



Power set

http://en.wikipedia.org/wiki/Power_set

In mathematics, the power set (or powerset) of any set S, written \mathcal{P}(S), P(S), ℙ(S), ℘(S) or 2S, is the set of all subsets of S, including the empty set and S itself.



from Google Plus RSS Feed for 101157854606139706613 http://en.wikipedia.org/wiki/Power_set

via LifeLong Community

EpiCode

Please Visit: http://lifelongprogrammer.blogspot.com



Source code of Elements of Programming Interviews

https://github.com/adnanaziz/EpiCode/tree/master/src/com/epi

https://code.google.com/p/elements-of-programming-interviews/

http://www.amazon.com/Elements-Programming-Interviews-Questions-Solutions/dp/1479274836



from Google Plus RSS Feed for 101157854606139706613 https://github.com/adnanaziz/EpiCode/tree/master/src/com/epi

via LifeLong Community