Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for hashOrder (0.19 sec)

  1. cmd/erasure-metadata-utils_test.go

    	for i, testCase := range testCases {
    		hashedOrder := hashOrder(testCase.objectName, 16)
    		if !reflect.DeepEqual(testCase.hashedOrder, hashedOrder) {
    			t.Errorf("Test case %d: Expected \"%v\" but failed \"%v\"", i+1, testCase.hashedOrder, hashedOrder)
    		}
    	}
    
    	// Tests hashing order to fail for when order is '-1'.
    	if hashedOrder := hashOrder("This will fail", -1); hashedOrder != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  2. docs/debugging/hash-set/main.go

    	return int(sum64 % uint64(cardinality))
    }
    
    // hashOrder - hashes input key to return consistent
    // hashed integer slice. Returned integer order is salted
    // with an input key. This results in consistent order.
    // NOTE: collisions are fine, we are not looking for uniqueness
    // in the slices returned.
    func hashOrder(key string, cardinality int) []int {
    	if cardinality <= 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  3. cmd/erasure-metadata-utils.go

    			continue
    		}
    		diskCount++
    	}
    	return diskCount
    }
    
    // hashOrder - hashes input key to return consistent
    // hashed integer slice. Returned integer order is salted
    // with an input key. This results in consistent order.
    // NOTE: collisions are fine, we are not looking for uniqueness
    // in the slices returned.
    func hashOrder(key string, cardinality int) []int {
    	if cardinality <= 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  4. cmd/storage-datatypes.go

    	fi.Erasure = ErasureInfo{
    		Algorithm:    erasureAlgorithm,
    		DataBlocks:   dataBlocks,
    		ParityBlocks: parityBlocks,
    		BlockSize:    blockSizeV2,
    		Distribution: hashOrder(object, dataBlocks+parityBlocks),
    	}
    	return fi
    }
    
    // ReadMultipleReq contains information of multiple files to read from disk.
    type ReadMultipleReq struct {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  5. cmd/erasure-healing_test.go

    				return
    			}
    			actualSha256 := actualH.Sum(nil)
    
    			z := obj.(*erasureServerPools)
    			er := z.serverPools[0].getHashedSet(object)
    
    			disks := er.getDisks()
    			distribution := hashOrder(pathJoin(bucket, object), nDisks)
    			shuffledDisks := shuffleDisks(disks, distribution)
    
    			// remove last data shard
    			err = removeAll(pathJoin(shuffledDisks[11].String(), bucket, object))
    			if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 47.6K bytes
    - Viewed (0)
Back to top