Examples of checksum()


Examples of org.elasticsearch.index.store.StoreFileMetaData.checksum()

                                            throw new IndexShardClosedException(shard.shardId());
                                        }
                                        int toRead = readCount + BUFFER_SIZE > len ? (int) (len - readCount) : BUFFER_SIZE;
                                        long position = indexInput.getFilePointer();
                                        indexInput.readBytes(buf, 0, toRead, false);
                                        transportService.submitRequest(request.targetNode(), RecoveryTarget.Actions.FILE_CHUNK, new RecoveryFileChunkRequest(request.shardId(), name, position, len, md.checksum(), buf, toRead),
                                                TransportRequestOptions.options().withCompress(compress).withLowType(), VoidTransportResponseHandler.INSTANCE_SAME).txGet();
                                        readCount += toRead;
                                    }
                                    indexInput.close();
                                } catch (Exception e) {
View Full Code Here

Examples of org.elasticsearch.index.store.StoreFileMetaData.checksum()

                                response.phase1ExistingFileNames.add(name);
                                response.phase1ExistingFileSizes.add(md.length());
                                existingTotalSize += md.length();
                                useExisting = true;
                                if (logger.isTraceEnabled()) {
                                    logger.trace("[{}][{}] recovery [phase1] to {}: not recovering [{}], exists in local store and has checksum [{}], size [{}]", request.shardId().index().name(), request.shardId().id(), request.targetNode(), name, md.checksum(), md.length());
                                }
                            }
                        }
                        if (!useExisting) {
                            if (request.existingFiles().containsKey(name)) {
View Full Code Here

Examples of org.elasticsearch.index.store.StoreFileMetaData.checksum()

                response.phase1ExistingFileNames.add(md.name());
                response.phase1ExistingFileSizes.add(md.length());
                existingTotalSize += md.length();
                if (logger.isTraceEnabled()) {
                    logger.trace("[{}][{}] recovery [phase1] to {}: not recovering [{}], exists in local store and has checksum [{}], size [{}]",
                            indexName, shardId, request.targetNode(), md.name(), md.checksum(), md.length());
                }
                totalSize += md.length();
            }
            for (StoreFileMetaData md : Iterables.concat(diff.different, diff.missing)) {
                if (request.existingFiles().containsKey(md.name())) {
View Full Code Here

Examples of org.elasticsearch.index.store.StoreFileMetaData.checksum()

        for (String name : metadata.asMap().keySet()) {
            StoreFileMetaData metaData = metadata.get(name);
            Map<String, Object> info = new HashMap();
            info.put("name", name);
            info.put("length", metaData.length());
            info.put("checksum", metaData.checksum() );
            info.put("function", getFileFunction(name));
            result.add(info);
        }
        response.put("store", result);
    }
View Full Code Here

Examples of org.gdal.gdal.Band.Checksum()

                                    }
                                }

                                if ( bComputeChecksum)
                                {
                                    System.out.println( "  Checksum=" + hBand.Checksum());
                                }

        hBand.GetNoDataValue(pass1);
        if(pass1[0] != null)
        {
View Full Code Here

Examples of org.gdal.gdal.Band.Checksum()

                           
                                                if( iOverview != 0 )
                                                    System.out.print( ", " );
                           
                                                hOverview = hBand.GetOverview(iOverview);
                                                System.out.print( hOverview.Checksum());
                                            }
                                            System.out.print( "\n" );
                                        }
        }
View Full Code Here

Examples of org.jnetpcap.protocol.network.Icmp.checksum()

        long f = packet.getFrameNumber();
        assertTrue("#" + f, packet.hasHeader(ip));

        if (icmp.isChecksumValid() == false) {
          System.out.printf("#%d shouldbe=%x checksum=%x\n", f, icmp
              .calculateChecksum(), icmp.checksum());
        }

        assertTrue("#" + f, icmp.isChecksumValid());
      }
View Full Code Here

Examples of org.jnetpcap.protocol.network.Icmp.checksum()

    assertTrue(packet.hasHeader(Payload.ID));

    // Check specific values
    assertEquals(3, icmp.type());
    assertEquals(3, icmp.code());
    assertEquals(0x2731, icmp.checksum());
    assertEquals(0, unreach.reserved());

    assertEquals(0x8724, ip.checksum());
    assertEquals(440, ip.length());
View Full Code Here

Examples of org.jnetpcap.protocol.network.Icmp.checksum()

    assertTrue(packet.hasHeader(icmp));
    assertTrue(icmp.hasSubHeader(echo));

    assertEquals(8, icmp.type());
    assertEquals(0, icmp.code());
    assertEquals(0x10FD, icmp.checksum());

    assertEquals(0xd001, echo.id());
    assertEquals(0x811e, echo.sequence());

    // Devil's advocate
View Full Code Here

Examples of org.jnetpcap.protocol.network.Icmp.checksum()

    TextFormatter out = new TextFormatter();
//    out.format(echo, Detail.MULTI_LINE_FULL_DETAIL);

    assertEquals(0, icmp.type());
    assertEquals(0, icmp.code());
    assertEquals(0x18FD, icmp.checksum());

    assertEquals(0xd001, echo.id());
    assertEquals(0x811e, echo.sequence());

    // Devil's advocate
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.