• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java KettleEOFException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.di.core.exception.KettleEOFException的典型用法代码示例。如果您正苦于以下问题:Java KettleEOFException类的具体用法?Java KettleEOFException怎么用?Java KettleEOFException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



KettleEOFException类属于org.pentaho.di.core.exception包,在下文中一共展示了KettleEOFException类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: DBCacheEntry

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
/**
 * Read the data for this Cache entry from a data input stream
 * @param dis The DataInputStream to read this entry from.
 * @throws KettleFileException if the cache can't be read from disk when it should be able to.  
 * If the cache file doesn't exists, no exception is thrown 
 */
public DBCacheEntry(DataInputStream dis) throws KettleFileException
{
	try
	{
		dbname  = dis.readUTF();
		sql     = dis.readUTF();
	}
	catch(EOFException eof)
	{
		throw new KettleEOFException("End of file reached", eof);
	}
	catch(Exception e)
	{
		throw new KettleFileException("Unable to read cache entry from data input stream", e);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:23,代码来源:DBCacheEntry.java


示例2: processRow

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
	meta=(CubeInputMeta)smi;
	data=(CubeInputData)sdi;

	try
	{
           Object[] r = data.meta.readData(data.dis);
           putRow(data.meta, r);  // fill the rowset(s). (sleeps if full)
           incrementLinesInput();
		
		if (meta.getRowLimit()>0 && getLinesInput()>=meta.getRowLimit()) // finished!
		{
			setOutputDone();
			return false;
		}
	}
	catch(KettleEOFException eof)
	{
		setOutputDone();
		return false;
	} 
	catch (SocketTimeoutException e) 
	{
		throw new KettleException(e); // shouldn't happen on files
	}

       if (checkFeedback(getLinesInput())) 
       {
       	if(log.isBasic()) logBasic(Messages.getString("CubeInput.Log.LineNumber")+getLinesInput()); //$NON-NLS-1$
       }

	return true;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:35,代码来源:CubeInput.java


示例3: processRow

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
{
	meta=(CubeInputMeta)smi;
	data=(CubeInputData)sdi;

	try
	{
           Object[] r = data.meta.readData(data.dis);
           putRow(data.meta, r);  // fill the rowset(s). (sleeps if full)
           incrementLinesInput();
		
		if (meta.getRowLimit()>0 && getLinesInput()>=meta.getRowLimit()) // finished!
		{
			setOutputDone();
			return false;
		}
	}
	catch(KettleEOFException eof)
	{
		setOutputDone();
		return false;
	} 
	catch (SocketTimeoutException e) 
	{
		throw new KettleException(e); // shouldn't happen on files
	}

       if (checkFeedback(getLinesInput())) 
       {
       	if(log.isBasic()) logBasic(BaseMessages.getString(PKG, "CubeInput.Log.LineNumber")+getLinesInput()); //$NON-NLS-1$
       }

	return true;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:35,代码来源:CubeInput.java


示例4: processRow

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {

    if ( first ) {
      first = false;
      meta = (CubeInputMeta) smi;
      data = (CubeInputData) sdi;
      realRowLimit = Const.toInt( environmentSubstitute( meta.getRowLimit() ), 0 );
    }


    try {
      Object[] r = data.meta.readData( data.dis );
      putRow( data.meta, r ); // fill the rowset(s). (sleeps if full)
      incrementLinesInput();

      if ( realRowLimit > 0 && getLinesInput() >= realRowLimit ) { // finished!
        setOutputDone();
        return false;
      }
    } catch ( KettleEOFException eof ) {
      setOutputDone();
      return false;
    } catch ( SocketTimeoutException e ) {
      throw new KettleException( e ); // shouldn't happen on files
    }

    if ( checkFeedback( getLinesInput() ) ) {
      if ( log.isBasic() ) {
        logBasic( BaseMessages.getString( PKG, "CubeInput.Log.LineNumber" ) + getLinesInput() );
      }
    }

    return true;
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:35,代码来源:CubeInput.java


示例5: DBCacheEntry

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
/**
 * Read the data for this Cache entry from a data input stream
 *
 * @param dis
 *          The DataInputStream to read this entry from.
 * @throws KettleFileException
 *           if the cache can't be read from disk when it should be able to. If the cache file doesn't exists, no
 *           exception is thrown
 */
public DBCacheEntry( DataInputStream dis ) throws KettleFileException {
  try {
    dbname = dis.readUTF();
    sql = dis.readUTF();
  } catch ( EOFException eof ) {
    throw new KettleEOFException( "End of file reached", eof );
  } catch ( Exception e ) {
    throw new KettleFileException( "Unable to read cache entry from data input stream", e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:DBCacheEntry.java


示例6: testClass

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
@Test
public void testClass() throws IOException, KettleFileException {
  final String dbName = "dbName";
  final String sql = "sql query";
  DBCacheEntry entry = new DBCacheEntry( dbName, sql );
  assertTrue( entry.sameDB( "dbName" ) );
  assertFalse( entry.sameDB( "otherDb" ) );
  assertEquals( dbName.toLowerCase().hashCode() ^ sql.toLowerCase().hashCode(), entry.hashCode() );
  DBCacheEntry otherEntry = new DBCacheEntry();
  assertFalse( otherEntry.sameDB( "otherDb" ) );
  assertEquals( 0, otherEntry.hashCode() );
  assertFalse( entry.equals( otherEntry ) );
  assertFalse( entry.equals( new Object() ) );

  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  DataOutputStream dos = new DataOutputStream( baos );

  dos.writeUTF( dbName );
  dos.writeUTF( sql );

  byte[] bytes = baos.toByteArray();
  InputStream is = new ByteArrayInputStream( bytes );
  DataInputStream dis = new DataInputStream( is );
  DBCacheEntry disEntry = new DBCacheEntry( dis );
  assertTrue( disEntry.equals( entry ) );
  try {
    new DBCacheEntry( dis );
    fail( "Should throw KettleEOFException on EOFException" );
  } catch ( KettleEOFException keofe ) {
    // Ignore
  }

  baos.reset();

  assertTrue( disEntry.write( dos ) );
  assertArrayEquals( bytes, baos.toByteArray() );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:38,代码来源:DBCacheEntryTest.java


示例7: makeTestExtractDataWithTimestampConversion

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
private void makeTestExtractDataWithTimestampConversion( RowMetaInterface rowMeta, String str, Date date,
    Timestamp constTimestamp ) throws KettleEOFException, KettleFileException, IOException {
  Object[] rowData = new Object[] { str, date };
  byte[] result = RowMeta.extractData( rowMeta, rowData );
  DataInputStream stream = new DataInputStream( new ByteArrayInputStream( result ) );
  String extractedString = (String) new ValueMetaString().readData( stream );
  Timestamp time = (Timestamp) new ValueMetaTimestamp().readData( stream );
  stream.close();
  assertTrue( str.equals( extractedString ) );
  assertTrue( constTimestamp.equals( time ) );

}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:13,代码来源:RowTest.java


示例8: readData

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
/**
 * De-serialize data from an inputstream.  No metadata is read or changed.
 * @param inputStream the input stream to read from 
 * @return a new data object
 * @throws KettleFileException in case a I/O error occurs
 * @throws KettleEOFException When we have read all the data there is to read
 * @throws SocketTimeoutException In case there is a timeout (when set on a socket) during reading
 */
public Object readData(DataInputStream inputStream) throws KettleFileException, KettleEOFException, SocketTimeoutException;
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:10,代码来源:ValueMetaInterface.java


示例9: ValueMeta

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
/**
 * @param inputStream
 * @throws KettleFileException
 * @throws KettleEOFException
 * @deprecated
 */
public ValueMeta(DataInputStream inputStream) throws KettleFileException, KettleEOFException {
  super(inputStream);
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:10,代码来源:ValueMeta.java


示例10: readMetaData

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
/**
 * Read the attributes of this particular value meta object from the specified input stream.
 * Loading the type is not handled here, this should be read from the stream previously!
 * 
 * @param inputStream the input stream to read from
 * @throws KettleFileException In case there was a IO problem
 * @throws KettleEOFException If we reached the end of the stream
 */
public void readMetaData(DataInputStream inputStream) throws KettleFileException, KettleEOFException;
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:10,代码来源:ValueMetaInterface.java


示例11: ValueMeta

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
/**
 * @param inputStream
 * @throws KettleFileException
 * @throws KettleEOFException
 * @deprecated
 */
@Deprecated
public ValueMeta( DataInputStream inputStream ) throws KettleFileException, KettleEOFException {
  super( inputStream );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:11,代码来源:ValueMeta.java


示例12: readData

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
/**
 * De-serialize data from an inputstream. No metadata is read or changed.
 *
 * @param inputStream
 *          the input stream to read from
 * @return a new data object
 * @throws KettleFileException
 *           in case a I/O error occurs
 * @throws KettleEOFException
 *           When we have read all the data there is to read
 * @throws SocketTimeoutException
 *           In case there is a timeout (when set on a socket) during reading
 */
Object readData( DataInputStream inputStream ) throws KettleFileException, KettleEOFException,
  SocketTimeoutException;
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:16,代码来源:ValueMetaInterface.java


示例13: readMetaData

import org.pentaho.di.core.exception.KettleEOFException; //导入依赖的package包/类
/**
 * Read the attributes of this particular value meta object from the specified input stream. Loading the type is not
 * handled here, this should be read from the stream previously!
 *
 * @param inputStream
 *          the input stream to read from
 * @throws KettleFileException
 *           In case there was a IO problem
 * @throws KettleEOFException
 *           If we reached the end of the stream
 */
void readMetaData( DataInputStream inputStream ) throws KettleFileException, KettleEOFException;
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:13,代码来源:ValueMetaInterface.java



注:本文中的org.pentaho.di.core.exception.KettleEOFException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HadoopUsersConfTestHelper类代码示例发布时间:2022-05-22
下一篇:
Java RegisterApplicationMasterRequestProtoOrBuilder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap