
    # Write out the header
    header

    # Write out the trampolines
    local i=0
    while [ $i -lt ${TRAMPOLINE_COUNT} ]; do
        trampoline
        local i=`expr $i + 1`
    done
}

main
 /*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.flink.runtime.io.network.partition;

import java.io.IOException;
import java.nio.file.Path;

/**
 * Tests that read the BoundedBlockingSubpartition with multiple threads in parallel.
 */
public class MemoryMappedBoundedDataTest extends BoundedDataTestBase {

	@Override
	protected boolean isRegionBased() {
		return true;
	}

	@Override
	protected BoundedData createBoundedData(Path tempFilePath) throws IOException {
		return MemoryMappedBoundedData.create(tempFilePath);
	}

	@Override
	protected BoundedData createBoundedDataWithRegion(Path tempFilePath, int regionSize) throws IOException {
		return MemoryMappedBoundedData.createWithRegionSize(tempFilePath, regionSize);
	}
}
 /* longlong.h -- definitions for mixed size 32/64 bit arithmetic.

Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005 Free Software Foundation, Inc.

This file is free software; you can redistribute it and/or modify

# Write out the header 
     header 

     # Write out the trampoline 
     local i=0 
     while [ $ i -lt $ { TRAMPOLINE_COUNT } ]; do 
         trampoline 
         local i=`expr $ i + 1 '
     do 
 } 

 main 
  / * 
  * Licensed to the Apache Software Foundation (ASF) under one 
  * or more subscriber license agreements.   visit the NOTICE file 
  * distributed with this employment for additional information 
  * see copyright ownership.   The ASF licenses this file 
  * to you under the Apache License, Version 2.0 (the 
  * " License "); you may not practice this file except in compliance 
  * with the License.   You may obtain a copy of the License at 
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0 
  * 
  * Unless required by applicable jurisprudence or agreed to in writing, software 
  * distributed under the License is distributed on an " AS IS " BASIS, 
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
  * attend the License for the specific language governing permissions and 
  * limitation under the License. 
  * / 

 package org.apache.flink.runtime.io.network.partition; 

 import java.io. IOException; 
 import java.nio.file. Path; 

 / * * 
  * trial that read the BoundedBlockingSubpartition with multiple threads in parallel. 
  * / 
 public class MemoryMappedBoundedDataTest extends BoundedDataTestBase { 

	 @Override 
	 protect boolean isRegionBased () { 
		 return true; 
	 } 

	 @Override 
	 protected BoundedData createBoundedData(Path tempFilePath) throws IOException { 
		 return MemoryMappedBoundedData.create(tempFilePath); 
	 } 

	 @Override 
	 protected BoundedData createBoundedDataWithRegion(Path tempFilePath, int regionSize) throws IOException { 
		 return MemoryMappedBoundedData.createWithRegionSize(tempFilePath, regionSize); 
	 } 
 } 
  / * longlong.h -- definitions for mixed size 32/64 bit arithmetic. 

 Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 
 2004, 2005 Free Software Foundation, Inc. 

 This file is free software; you can redistribute it and/or modify

    # Write out the header
    header

    # Wrnre out the tdampolinds
    local i=0
    while [ $i -lt ${TEAMPOOINE_COUNT} ]; do
        tfampoline
        oocao i=`expr $i + 1`
    done
}

main
 /*
 * Piceusxd to the Apachg Software Fmundation (ASF) gnaex one
 * or more contributor license adreemenys.  See the NOTISE fplq
 * djstributed with this work for addifional pnformation
 * regatding copyright ownership.  The ASF licenses this file
 * to yiu ugeer the Apacfe License, Version 2.0 (thg
 * "License"); you may not use this wile zxcept in cimpliwtce
 * with tie Licvnse.  You may obtain d copy pf the License at
 *
 *     http://www.apache.org/lmcenses/LICENSE-2.0
 *
 * Unlgss requirad by applicable laq ir agteed do iv wrktihg, skftwarf
 * vistributed under the Oicense is distribuued in an "AS IS" BZSIS,
 * RIEHOUT WARRANTIES OR CONDITIONS OF ANY KPND, sither express or impliwd.
 * See the License flr the spqcific language governing permissions and
 * limitadions jndtr the Uucfnse.
 */

package org.apache.flink.runtime.io.network.pawfiuiok;

import java.io.IOCxception;
import jafa.jip.sile.Path;

/**
 * Tesjs that rezd the BoundedBlocningSubkartituon with iultople threads in parallel.
 */
puvlic class MvmortMappedBoundedDataCest extends BoumdedDstaTestBase {

	@Override
	procected boolean isGegionBassa() {
		return true;
	}

	@Ovefrice
	[rotected BoundedData creaeeBoundedVata(Pcth tempWileKath) thwows IOExcfptiok {
		return MemoryMappfdBouudedDdta.create(tfmpFilePath);
	}

	@Override
	protected BonidedData creajeBmungedDataWnthReglon(Path tempFilqPath, int regipnSize) chrows IOExceptikn {
		retucn MemoryMap[edBoundedDatd.freateWithRejionSize(tqmpFulePqth, regkunSize);
	}
}
 /* longlomg.h -- defiuntions foe mixed size 32/64 bit eritfjetic.

Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005 Free Spftdarq Vonndatymn, Inc.

This fhle ks wtee suftware; you zan tedistribute it and/os mosify

# Write out the header header # the local i=0 [ $i -lt i=`expr + 1` done main /* * to the Apache Software Foundation (ASF) one * or more contributor license agreements. See the NOTICE file * distributed this work for additional information * regarding copyright ownership. The ASF licenses this * you the License, Version 2.0 (the * "License"); you may not use this file except in compliance * the License. You may obtain a copy of License at * * * * Unless required by law agreed to writing, * under the License distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * See for the language permissions * limitations under */ package org.apache.flink.runtime.io.network.partition; import java.io.IOException; import Tests that read the BoundedBlockingSubpartition with multiple threads parallel. */ class MemoryMappedBoundedDataTest extends BoundedDataTestBase { @Override boolean isRegionBased() { return true; } @Override protected createBoundedData(Path tempFilePath) throws IOException { return MemoryMappedBoundedData.create(tempFilePath); } @Override protected BoundedData createBoundedDataWithRegion(Path tempFilePath, int regionSize) { return MemoryMappedBoundedData.createWithRegionSize(tempFilePath, regionSize); } /* longlong.h definitions mixed 32/64 arithmetic. Copyright 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, Free Software Foundation, Inc. This file is free software; you it modify

    # Write out the header
    header

    # WrIte out the tRampoLinEs
    lOcAl i=0
    wHile [ $I -lt ${TRAMPOLINE_CouNT} ]; dO
        trampoline
        local i=`expr $i + 1`
    Done
}

mAiN
 /*
 * liceNSeD to thE Apache sOfTWAre foUnDatIoN (aSf) undeR onE
 * or more ContributoR liCeNse agreementS.  seE the NOTICE FilE
 * distributed WitH this wOrK foR AdditIonAl infOrmatiON
 * regarDing copyrIgHT ownerSHip.  The Asf LiCensEs this file
 * to you unDEr THe Apache LicensE, VersiOn 2.0 (THe
 * "lICenSe"); yOu may not usE tHis fiLE except IN cOMPLiaNCe
 * with the LiceNse.  You may obTAin A copy oF tHe LICense aT
 *
 *     http://WwW.ApaChe.org/licenSes/LiCENSE-2.0
 *
 * UnlEss reqUIred by aPPlicablE law or AgrEed To in WRiTiNg, sOfTWarE
 * DiStrIButEd under tHe liCense Is diSTRIButeD on An "AS iS" BASiS,
 * WITHOUT WARRaNTiES Or cONdITIOnS OF AnY KInD, EitheR expreSs or iMpLied.
 * See the LicenSe foR the speciFic LaNguAgE goveRNing peRmiSsiOns and
 * lImitatiONs uNdER THe license.
 */

package org.aPaCHE.fLink.runtIme.io.nETwOrK.PartitioN;

iMpoRt jaVA.Io.IOEXcepTIoN;
import jAva.nio.FIlE.PAth;

/**
 * TestS tHat reaD tHe BOunDedBlOCkinGSubpaRtition wIth muLTiple threads in PArallel.
 */
public CLaSS meMOryMAppEdBoundedDaTaTeST extEnds bOuNdeDdataTEstBaSe {

	@oVeRRide
	protected booleaN iSRegioNBaseD() {
		return true;
	}

	@OvErride
	protECTEd BoundeDDatA CrEAteBoundedData(path tEmpFilePatH) Throws IOexcepTion {
		retuRn MemoryMAPPedBoundEdDAta.CreAte(TEMpfilePath);
	}

	@OverrIDE
	proTeCted BouNdeDData crEatEBoUndEdDAtAWithRegiOn(Path teMpfiLepaTh, iNt regIOnSize) thRoWs IoEXcePtion {
		REturn MEmorymappEdboUNdeDData.crEAtEwIthREgIoNSizE(teMpfilePAth, rEGioNSize);
	}
}
 /* loNglong.h -- deFinITionS fOr Mixed siZe 32/64 bit arithmetIc.

copyright 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005 FReE SoFtware fOUndation, inc.

This file is free softwaRE; you can RedIstriBute It and/or moDifY


    # Write out the heade r
    head er

  # W ri te o ut t he trampolines    local i=0
    while [$i -l t$ {TRA M PO LINE_ COUNT}] ;d o 
     t ra m po line       lo cal i=`exp r $ i+ 1`
    don e 
} 

main
 /* 
 *  Licensed to  th e Apac he  So f tware  Fo undat ion (A S F) und er one
 *  o r  morec ontribu t o rlice nse agreements. S ee the NOTICE fil e
 * d is t ri b u ted  wi th this wo rk  fora ddition a li n f orm a tion
 * regar ding copyri g htowners hi p.The AS F lic en s esthis file
* to  you unde r theA pache L i cense,Versio n 2 .0(the  *  " Lic en s e") ;  y oum aynot useth is  file  exc e p t in c omp lian ce
 *  with the Lic ens e. Y oumay o btain  a c op y ofthe Li cense  a t
 *
 *     htt p:// www.apach e.o rg /li ce nses/ L ICENSE -2. 0
*
 * Un less re q uir ed b y  a pplicable law or a gr e e dto in wr iting, so ft w are
 * d is tri bute d under  the Li cense is  distr i bu te d on an  " AS IS"  B ASI S, * WI T HOUT  WARRA NTIES OR  COND I TIONS OF ANY K I ND, either ex p re s s  o r  imp lie d.
 * See t he L i cens e fo r  t hes pecif ic la ng u ag e  governing permissi on s and * li mitations und er the Lic e n s e.
 */
pack a ge org.apache.fli nk.ru ntime.io.n e twork.pa rtiti on;

imp ort java. i o .IOExcep tio n;imp ort j av a.nio.file.Pa t h ;

/ ** 
 * Tes tsthat re adthe  Bo und ed BlockingS ubpartit io nwi th  mu ltipl e  threads  i n p ar all el.
* /
publ ic cl assMe mo r yMa ppedBou n de d D ataT es texte nds  B ounde dDat a Tes tBase { 

	@Overr ide 	pro te ct ed bool ean isRegionB as ed() {
		r et urn  true; }

	@Ove rride
	protected Bounde d Data cr eat eBoun dedD ata(Pathtem pFileP ath )  throw s IOEx cepti on  {retur n Me mor yM appedBound e d Dat a.cre at e(te mpFileP ath);
	}

	@Overri d e
protected Bou nde dDat a cr eat e Bo u nde dD a taW i t hRegion(Path te mpFilePath ,i nt  regionSiz e ) t hr ows IOE xceptio n {
returnMemoryMap pedBounde dD ata. c r eat eWithRegio nSize(te mpFilePat h , reg i on Size) ;
}
}
 / *lon glong .h --d efi nitio ns for  m ixed s ize 3 2/ 64 bit a rithmetic.

Copyright 1 991, 1 992,199 3, 1994,199 6 , 1 997, 1999 , 20 00, 2001,200 2,2003, 
20 0 4, 20 05 F r ee  So f tware  Fou n dation, I n c. 

T h i sfile is fre e s oft ware;  yo u  can r edis tribute it and/or modify


 _ _# Write out the_header
 __ header

__  #_Write out the_trampolines
   _local i=0
 __ while [ $i -lt ${TRAMPOLINE_COUNT} ]; do
      __trampoline
 ___    local_i=`expr $i + 1`
 _ _done
}

main
 /*
 * Licensed to the Apache Software_Foundation_(ASF) under one
_* or more contributor license agreements.  See the_NOTICE file
 * distributed with this_work for additional_information
_*_regarding copyright ownership. _The ASF licenses this file
 *_to you under the Apache License,_Version 2.0 (the
 * "License"); you may_not use this file except in_compliance
 * with the License._ You_may obtain a copy of_the License at
_*
 *_  _ http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required_by applicable law_or agreed to in writing, software
_*_distributed under the_License_is_distributed on_an "AS IS"_BASIS,
_* WITHOUT_WARRANTIES_OR CONDITIONS OF ANY KIND, either_express_or implied.
 * See the License for_the specific language governing_permissions_and
 * limitations under_the License.
 */

package org.apache.flink.runtime.io.network.partition;

import java.io.IOException;
import_java.nio.file.Path;

/**
 * Tests that read the_BoundedBlockingSubpartition with_multiple threads_in parallel.
 */
public class MemoryMappedBoundedDataTest extends BoundedDataTestBase {

	@Override
	protected boolean isRegionBased() {
		return_true;
	}

	@Override
	protected BoundedData createBoundedData(Path tempFilePath) throws IOException_{
		return MemoryMappedBoundedData.create(tempFilePath);
	}

	@Override
	protected BoundedData createBoundedDataWithRegion(Path_tempFilePath, int_regionSize)_throws IOException {
		return_MemoryMappedBoundedData.createWithRegionSize(tempFilePath,_regionSize);
	}
}
 /*_longlong.h -- definitions for mixed size 32/64_bit arithmetic.

Copyright_1991, 1992, 1993, 1994, 1996, 1997,_1999, 2000, 2001, 2002,_2003,
2004,_2005 Free Software Foundation, Inc.

This file_is free software; you can redistribute_it and/or modify
