Author: daijy
Date: Wed Oct 14 22:01:25 2009
New Revision: 825306
URL: http://svn.apache.org/viewvc?rev=825306&view=rev
Log:
PIG-1000: InternalCachedBag.java generates javac warning and findbug warning
Modified:
hadoop/pig/trunk/CHANGES.txt
hadoop/pig/trunk/src/org/apache/pig/data/InternalCachedBag.java
Modified: hadoop/pig/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=825306&r1=825305&r2=825306&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Wed Oct 14 22:01:25 2009
@@ -69,6 +69,8 @@
PIG-995: Limit Optimizer throw exception "ERROR 2156: Error while fixing
projections" (daijy)
+PIG-1000: InternalCachedBag.java generates javac warning and findbug warning
(yinghe via daijy)
+
Release 0.5.0 - Unreleased
INCOMPATIBLE CHANGES
Modified: hadoop/pig/trunk/src/org/apache/pig/data/InternalCachedBag.java
URL:
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/data/InternalCachedBag.java?rev=825306&r1=825305&r2=825306&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/data/InternalCachedBag.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/data/InternalCachedBag.java Wed Oct 14
22:01:25 2009
@@ -1,4 +1,20 @@
-
+/*
+ * 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.pig.data;
import java.io.*;
@@ -9,14 +25,15 @@
public class InternalCachedBag extends DefaultAbstractBag {
-
+ private static final long serialVersionUID = 1L;
+
private static final Log log =
LogFactory.getLog(InternalCachedBag.class);
- private int cacheLimit;
- private long maxMemUsage;
- private long memUsage;
- private DataOutputStream out;
- private boolean addDone;
- private TupleFactory factory;
+ private transient int cacheLimit;
+ private transient long maxMemUsage;
+ private transient long memUsage;
+ private transient DataOutputStream out;
+ private transient boolean addDone;
+ private transient TupleFactory factory;
public InternalCachedBag() {
@@ -150,7 +167,7 @@
public CachedBagIterator() {
iter = mContents.iterator();
if(mSpillFiles != null && mSpillFiles.size() > 0) {
- File file = (File)mSpillFiles.get(0);
+ File file = mSpillFiles.get(0);
try {
in = new DataInputStream(new BufferedInputStream(new
FileInputStream(file)));
}
@@ -168,7 +185,7 @@
}
if(iter.hasNext()){
- next = (Tuple)iter.next();
+ next = iter.next();
return true;
}