Page 1 of 1

Switch

Posted: Tue Oct 18, 2005 5:47 am
by legendkiller
in switch stage I have selected selectore mode as hash the documentation says following

"Hash means that rows are hashed on the selector column modulo the number of output links and assigned to an output link accordingly"

I am not getting what it does

my job has 3 output link and selectore column has values 2,3,10, 1
then in Out put I should get

2mod3 - assign to output dataste with label 2
3mod3 - assign to output dataste with label 0
10mod3 - assign to output dataste with label 1
1mod3 -assign to output dataste with label 1

is my understanding is correct

Posted: Tue Oct 18, 2005 8:17 am
by ArndW
LegendKiller,

you are correct, the modulo goes from link number 0 to {n-1}.

Posted: Tue Oct 18, 2005 4:08 pm
by ray.wurlod
Where DO the rows go, given that you seem to be implying that they don't go where you expect them to?

Posted: Wed Oct 19, 2005 5:18 am
by legendkiller
ray.wurlod wrote:Where DO the rows go, given that you seem to be implying that they don't go where you expect them to?

yes in my case

when selector value are 2,1 then they are going to dataset label 2

when selector value are 3,10 then they are going to dataset label 1

so it is not behaving as I expected

the input selector value are 2,3,10,1 and outpit link are 3 so i expected that

row containing value 2 will go to dataset 2
row containing value 3 will go to dataset 0
row containing value 1,10 will go to dataset 1

do i need to put partition as hash

Posted: Wed Oct 19, 2005 4:18 pm
by ray.wurlod
Your expectations are based on a modulus algorithm, so why not use that? You can not assert that a hashing algorithm will produce the same results as a modulus algorithm - hashing algorithms incorporate extra processing to try to guarantee repeatably-random but even allocation.

Posted: Mon Oct 24, 2005 8:22 am
by adarsh shrinagesh
legendkiller wrote:
ray.wurlod wrote:Where DO the rows go, given that you seem to be implying that they don't go where you expect them to?

yes in my case

when selector value are 2,1 then they are going to dataset label 2

when selector value are 3,10 then they are going to dataset label 1

so it is not behaving as I expected

the input selector value are 2,3,10,1 and outpit link are 3 so i expected that

row containing value 2 will go to dataset 2
row containing value 3 will go to dataset 0
row containing value 1,10 will go to dataset 1

do i need to put partition as hash
Hi

Have u been able to sort the anomaly
Have been trying to simulate the same scenario and am hitting the same prblm even after using modulo as the partitioning algo.

Thnx