返回DataStruct.close的百分比变化
196798
def close_pct_change(self):
        ''
        res = self.close.groupby(level=1).apply(lambda x: x.pct_change())
        res.name = 'close_pct_change'
        return res
1241643
void closedHandler(Object context, String input, Object frame, String stateName) {
        if (getReadyState() == ReadyState.CLOSED) {
            return;
        }
        
        // TODO: Determine whether channels need to be cleaned up.
        if (this.channels.size() != 0) {
            for (int i = 1; i <= this.channels.size(); i++) { // 1-based
                AmqpChannel channel = this.channels.get(i);
                AmqpFrame   f = new AmqpFrame();
                
                // Close each channel which should result in CLOSE event
                // to be fired for each of the registered ChannelListener(s).
                f.setMethodName("closeChannel");
                f.setChannelId((short) i);
                channel.channelClosedHandler(this, "", f, "closeChannel");
            }
        }
        
        try {
            // Mark the readyState to be CLOSED.
            readyState = ReadyState.CLOSED;
            
            // Fire CLOSE event for the ConnectionListener(s) registered
            // on AmqpClient object.
            fireOnClosed(new ConnectionEvent(this, Kind.CLOSE));

            // If the WebSocket(or ByteSocket) is still not closed, then 
            // invoke the close() method. The callback in this case will be a
            // a no-op as we have completed the book-keeping here.
            if (websocket != null) {
                websocket.close();
            }
        }
        catch (Exception e1) {
            throw new IllegalStateException(e1);
        }
        finally {
            websocket = null;
        }

    }
1103493
private synchronized void closeInternal() throws IOException {
    dfsClient.checkOpen();
    isClosed();

    try {
        eventStartWrite();

        flushBuffer(true, false);       // flush from all upper layers

        eventCloseAfterFlushBuffer();
        
        // Mark that this packet is the last packet in block.
        // If there are no outstanding packets and the last packet
        // was not the last one in the current block, then create a
        // packet with empty payload.
        synchronized (dataQueue) {
          if (currentPacket == null && bytesCurBlock != 0) {
            WritePacketClientProfile pktProfile = null;
            if (getProfileData() != null) {
              pktProfile = getProfileData().getWritePacketClientProfile();
            }
            currentPacket = DFSOutputStreamPacketFactory.getPacket(
              DFSOutputStream.this, ifPacketIncludeVersion(),
              getPacketVersion(), packetSize, chunksPerPacket, bytesCurBlock, pktProfile);
          }
          if (currentPacket != null) {
            currentPacket.lastPacketInBlock = true;
          }
        }
                
      flushInternal();             // flush all data to Datanodes
      isClosed(); // check to see if flushInternal had any exceptions
      closed = true; // allow closeThreads() to showdown threads

      closeThreads();

      synchronized (dataQueue) {
        if (blockStream != null) {
          blockStream.writeInt(0); // indicate end-of-block to datanode
          blockStream.close();
          blockReplyStream.close();
        }
        if (s != null) {
          for (int i = 0; i < s.length; i++) {
            s[i].close();
          }
          s = null;
        }
      }

      streamer = null;
      blockStream = null;
      blockReplyStream = null;

      eventCloseReceivedAck();
      
      dfsClient.closeFile(src, lastBlkOffset, getLastBlock());
      
      eventEndClose();
    } finally {
      closed = true;
    }
  }
394961
@SuppressWarnings({ "rawtypes", "unchecked" })
  public void close() throws IOException {
    if (!closed) {
      closeNewList();
      if (collectorType.equals(DataCollector.COLLECTOR_TYPE_LIST)) {
        // compute initial basic list
        TreeMap<String, MtasDataItem<T1, T2>> basicList = new TreeMap<>();
        for (int i = 0; i < getSize(); i++) {
          MtasDataItem<T1, T2> newItem = getItem(i);
          if (basicList.containsKey(keyList[i])) {
            newItem.add(basicList.get(keyList[i]));
          }
          basicList.put(keyList[i], newItem);
        }
        // create result based on basic list
        result = new MtasDataCollectorResult<>(collectorType, sortType,
            sortDirection, basicList, start, number);
        // reduce
        if (segmentRegistration != null) {
          if (segmentRegistration.equals(SEGMENT_SORT_ASC)
              || segmentRegistration.equals(SEGMENT_SORT_DESC)) {
            reduceToKeys(result.getComparatorList().keySet());
          } else if (segmentRegistration.equals(SEGMENT_BOUNDARY_ASC)
              || segmentRegistration.equals(SEGMENT_BOUNDARY_DESC)) {
            Map<String, MtasDataItemNumberComparator> comparatorList = result
                .getComparatorList();
            HashSet<String> filteredKeySet = new HashSet<>();
            if (segmentRegistration.equals(SEGMENT_BOUNDARY_ASC)) {
              for (Entry<String, MtasDataItemNumberComparator> entry : comparatorList
                  .entrySet()) {
                if (entry.getValue().compareTo(segmentValueBoundary) < 0) {
                  filteredKeySet.add(entry.getKey());
                }
              }
            } else {
              for (Entry<String, MtasDataItemNumberComparator> entry : comparatorList
                  .entrySet()) {
                if (entry.getValue().compareTo(segmentValueBoundary) > 0) {
                  filteredKeySet.add(entry.getKey());
                }
              }
            }
            reduceToKeys(filteredKeySet);
            basicList.keySet().retainAll(filteredKeySet);
            result = new MtasDataCollectorResult<>(collectorType, sortType,
                sortDirection, basicList, start, number);
          }
        }
      } else if (collectorType.equals(DataCollector.COLLECTOR_TYPE_DATA)) {
        if (getSize() > 0) {
          result = new MtasDataCollectorResult<>(collectorType, getItem(0));
        } else {
          result = new MtasDataCollectorResult<>(collectorType, sortType,
              sortDirection);
        }
      } else {
        throw new IOException("type " + collectorType + " not supported");
      }
      closed = true;
    }
  }
265645
protected boolean tryToClose() {
		ByteBuffer blocker = blockerBuffer.get();
		if (blocker == BUFFER_IS_CLOSED) {
			return true;
		}
		if (blocker != null) {
			return false;
		}
		boolean closed = blockerBuffer.compareAndSet(null, BUFFER_IS_CLOSED);
		if (closed) {
			closeResources();
			return true;
		}
		return false;
	}
270336
@Override
  public void close() throws IOException {
    if (currentOffset < dataLength) {
      byte[] t = new byte[Math.min((int)
            (Integer.MAX_VALUE & (dataLength - currentOffset)), 32 * 1024)];
      while (currentOffset < dataLength) {
        int n = read(t, 0, t.length);
        if (0 == n) {
          throw new EOFException("Could not validate checksum");
        }
      }
    }
    in.close();
  }
1168797
void writeClose(int code, ByteString reason) throws IOException {
    ByteString payload = ByteString.EMPTY;
    if (code != 0 || reason != null) {
      if (code != 0) {
        validateCloseCode(code);
      }
      Buffer buffer = new Buffer();
      buffer.writeShort(code);
      if (reason != null) {
        buffer.write(reason);
      }
      payload = buffer.readByteString();
    }

    try {
      writeControlFrame(OPCODE_CONTROL_CLOSE, payload);
    } finally {
      writerClosed = true;
    }
  }
1133075
public static void safeClose(final Iterable<? extends Closeable> ci) {
        if (ci != null) {
            for (Closeable closeable : ci) {
                safeClose(closeable);
            }
        }
    }
1373826
function(event) {
        sendPingTimeout && clearTimeout(sendPingTimeout);
        socketCloseTimeout && clearTimeout(socketCloseTimeout);
        forceCloseTimeout && clearTimeout(forceCloseTimeout);
        eventCallback["close"](event);
      }
937619
public void closeFastDataSource(DataSource ds) throws SQLException {
		BasicDataSource bds = (BasicDataSource) ds;
		bds.close();
	}
920833
function(){
        if (this._slicer) {
          this._slicer.close();
        }
        var i, n = this._numAxes;
        for (i = 0; i < n; i++) {
          this.getAxis(i).close();
        }
        this._cellset.close();
        this._cellset = null;
        this._root = null;
        this._axes = null;
        this._axesOrder = null;
        this._numAxes = null;
        this._slicer = null;
    }
374380
public void close(C1NChunk c, int cidx, Futures fs) {
    assert _len==-1;            // Not closed
    c._vec = this;              // Attach chunk to this vec.
    DKV.put(chunkKey(cidx),c,fs); // Write updated chunk back into K/V
    _len = ((_nchunks-1L)<<H2O.LOG_CHK)+c._len;
  }
922019
final void closeChildWrappers() 
    {
        TraceComponent tc = getTracer(); 
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); 

        // Close any child wrappers in the child wrapper list.

        if (childWrappers != null && !childWrappers.isEmpty()) {
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(this, tc, "Closing child wrappers"); 
            WSJdbcObject wrapper = null;

            // Children remove themselves from the childWrappers list as they are closed.
            for (int i = childWrappers.size(); i > 0;)
                try {
                    wrapper = (WSJdbcObject) childWrappers.get(--i);
                    wrapper.close();
                } catch (SQLException closeX) // can't fail here, need to keep closing
                {
                    FFDCFilter.processException(closeX,
                                                "com.ibm.ws.rsadapter.jdbc.WSJdbcObject.closeChildWrappers", "554", this);
                } catch (IndexOutOfBoundsException ioobX) 
                {
                    if (isTraceOn && tc.isDebugEnabled()) 
                    {
                        Tr.debug(this, tc, "ArrayIndexOutOfBoundsException is caught during closeChildWrappers() of the WSJdbcObject");
                        Tr.debug(this, tc, "Possible causes:");
                        Tr.debug(this, tc, "multithreaded access of JDBC objects by the Application");
                        Tr.debug(this, tc, "Application is closing JDBC objects in a finalize()");
                        Tr.debug(this, tc, "Exception is: ", ioobX);
                    }
                    throw ioobX;
                }

        }

        // Close this object's single child wrapper, if one exists.

        if (childWrapper != null)
            try {
                if (isTraceOn && tc.isDebugEnabled())
                    Tr.debug(this, tc, "Closing child wrapper"); 
                childWrapper.close();
            } catch (SQLException closeX) {
                FFDCFilter.processException(closeX,
                                            "com.ibm.ws.rsadapter.jdbc.WSJdbcObject.closeChildWrappers", "573", this);
            }
    }
914367
def close(self, ulBuffer):
        """"""

        fn = self.function_table.close
        result = fn(ulBuffer)
        return result
1200034
public static void closeEL(Closeable c) {
	try {
	    if (c != null) c.close();
	}
	// catch (AlwaysThrow at) {throw at;}
	catch (Throwable e) {
	    ExceptionUtil.rethrowIfNecessary(e);
	}
    }
405961
public void onAbnormalClose(CloseInfo close) {
        if (LOG.isDebugEnabled())
            LOG.debug("onAbnormalClose({})", close);
        ConnectionState event = null;
        synchronized (this) {
            if (this.state == ConnectionState.CLOSED) {
                // already closed
                return;
            }

            if (this.state == ConnectionState.OPEN) {
                this.cleanClose = false;
            }

            this.state = ConnectionState.CLOSED;
            finalClose.compareAndSet(null, close);
            this.inputAvailable = false;
            this.outputAvailable = false;
            this.closeHandshakeSource = CloseHandshakeSource.ABNORMAL;
            event = this.state;
        }
        notifyStateListeners(event);
    }
1231097
public static boolean closeDataSource(DataSource ds) throws SQLException {
        try {
            Method closeMethod = ds.getClass().getMethod("close");
            try {
                closeMethod.invoke(ds);
            } catch (Throwable e) {
                ThrowUnchecked.fireFirstDeclaredCause(e, SQLException.class);
            }
            return true;
        } catch (NoSuchMethodException e) {
            return false;
        }
    }